OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // The LocationBar class is a virtual interface, defining access to the | 5 // The LocationBar class is a virtual interface, defining access to the |
6 // window's location bar component. This class exists so that cross-platform | 6 // window's location bar component. This class exists so that cross-platform |
7 // components like the browser command system can talk to the platform | 7 // components like the browser command system can talk to the platform |
8 // specific implementations of the location bar control. It also allows the | 8 // specific implementations of the location bar control. It also allows the |
9 // location bar to be mocked for testing. | 9 // location bar to be mocked for testing. |
10 | 10 |
11 #ifndef CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_H_ | 11 #ifndef CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_H_ |
12 #define CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_H_ | 12 #define CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_H_ |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "base/string16.h" | 16 #include "base/string16.h" |
17 #include "chrome/common/instant_types.h" | |
18 #include "content/public/common/page_transition_types.h" | 17 #include "content/public/common/page_transition_types.h" |
19 #include "ui/base/window_open_disposition.h" | 18 #include "ui/base/window_open_disposition.h" |
20 | 19 |
21 class ExtensionAction; | 20 class ExtensionAction; |
22 class LocationBarTesting; | 21 class LocationBarTesting; |
23 class OmniboxView; | 22 class OmniboxView; |
24 | 23 |
25 namespace content { | 24 namespace content { |
26 class WebContents; | 25 class WebContents; |
27 } | 26 } |
28 | 27 |
29 class LocationBar { | 28 class LocationBar { |
30 public: | 29 public: |
31 // Shows the first run bubble anchored to the location bar. | 30 // Shows the first run bubble anchored to the location bar. |
32 virtual void ShowFirstRunBubble() = 0; | 31 virtual void ShowFirstRunBubble() = 0; |
33 | 32 |
34 // Sets the suggested text to show in the omnibox. This is shown in addition | |
samarth
2013/03/11 19:03:24
What's going on with this change? Seems like a rea
| |
35 // to the current text of the omnibox. | |
36 virtual void SetInstantSuggestion(const InstantSuggestion& suggestion) = 0; | |
37 | |
38 // Returns the string of text entered in the location bar. | 33 // Returns the string of text entered in the location bar. |
39 virtual string16 GetInputString() const = 0; | 34 virtual string16 GetInputString() const = 0; |
40 | 35 |
41 // Returns the WindowOpenDisposition that should be used to determine where | 36 // Returns the WindowOpenDisposition that should be used to determine where |
42 // to open a URL entered in the location bar. | 37 // to open a URL entered in the location bar. |
43 virtual WindowOpenDisposition GetWindowOpenDisposition() const = 0; | 38 virtual WindowOpenDisposition GetWindowOpenDisposition() const = 0; |
44 | 39 |
45 // Returns the PageTransition that should be recorded in history when the URL | 40 // Returns the PageTransition that should be recorded in history when the URL |
46 // entered in the location bar is loaded. | 41 // entered in the location bar is loaded. |
47 virtual content::PageTransition GetPageTransition() const = 0; | 42 virtual content::PageTransition GetPageTransition() const = 0; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
109 virtual void TestActionBoxMenuItemSelected(int command_id) = 0; | 104 virtual void TestActionBoxMenuItemSelected(int command_id) = 0; |
110 | 105 |
111 // Returns whether or not the bookmark star decoration is visible. | 106 // Returns whether or not the bookmark star decoration is visible. |
112 virtual bool GetBookmarkStarVisibility() = 0; | 107 virtual bool GetBookmarkStarVisibility() = 0; |
113 | 108 |
114 protected: | 109 protected: |
115 virtual ~LocationBarTesting() {} | 110 virtual ~LocationBarTesting() {} |
116 }; | 111 }; |
117 | 112 |
118 #endif // CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_H_ | 113 #endif // CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_H_ |
OLD | NEW |