summaryrefslogtreecommitdiff
path: root/chromium/blimp/common/proto/navigation.proto
blob: 62bb270e70f88e0326b9dd61415b226bf14e32d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Message definitions for browser navigation messages.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package blimp;

message LoadUrlMessage {
  // The text to generate and create a URL from.  This might be a URL or might
  // not.  It might be text that should be turned into a search URL.
  // Some example inputs:
  // 1. google.com
  // 2. www.wikipedia.org
  // 3. dogs
  optional string url = 1;
}

message NavigationStateChangeMessage {
  // If the URL changed, this will include the new URL string.
  optional string url = 1;

  // If the favicon of the page changed, this should include the serialized
  // bitmap of the favicon.
  optional bytes favicon = 2;

  // If the title changed, this will contain the new title string.
  optional string title = 3;

  // If the loading state changed, this will contain whether or not the page is
  // loading.  See WebContents::IsLoading() for more details.
  // TODO(dtrainor): Figure out exactly what we want to send here.  Loading may
  // mean different things for different contexts (crbug.com/563626).
  optional bool loading = 4;
  
  // Denotes whether the page load has been finished. While |loading| above will
  // be true when any resources are being loaded from the network,
  // |page_load_completed| is set to true when the initial page load has
  // completed.
  optional bool page_load_completed = 5;
}

message NavigationMessage {
  enum Type {
    UNKNOWN = 0;

    // Server => Client types.
    NAVIGATION_STATE_CHANGED = 1;

    // Client => Server types.
    LOAD_URL = 2;
    GO_BACK = 3;
    GO_FORWARD = 4;
    RELOAD = 5;
  }

  optional Type type = 1;

  optional NavigationStateChangeMessage navigation_state_changed = 1000;
  optional LoadUrlMessage load_url = 1001;
}