| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_LOCATION_BAR_H_ | 11 #ifndef CHROME_BROWSER_LOCATION_BAR_H_ |
| 12 #define CHROME_BROWSER_LOCATION_BAR_H_ | 12 #define CHROME_BROWSER_LOCATION_BAR_H_ |
| 13 | 13 |
| 14 #include <string> | 14 #include <string> |
| 15 | 15 |
| 16 #include "chrome/common/page_transition_types.h" | 16 #include "chrome/common/page_transition_types.h" |
| 17 #include "webkit/glue/window_open_disposition.h" | 17 #include "webkit/glue/window_open_disposition.h" |
| 18 | 18 |
| 19 class AutocompleteEditView; | 19 class AutocompleteEditView; |
| 20 class ExtensionAction; |
| 20 class LocationBarTesting; | 21 class LocationBarTesting; |
| 21 class TabContents; | 22 class TabContents; |
| 22 | 23 |
| 23 class LocationBar { | 24 class LocationBar { |
| 24 public: | 25 public: |
| 25 // Shows the first run information bubble anchored to the location bar. | 26 // Shows the first run information bubble anchored to the location bar. |
| 26 virtual void ShowFirstRunBubble(bool use_OEM_bubble) = 0; | 27 virtual void ShowFirstRunBubble(bool use_OEM_bubble) = 0; |
| 27 | 28 |
| 28 // Returns the string of text entered in the location bar. | 29 // Returns the string of text entered in the location bar. |
| 29 virtual std::wstring GetInputString() const = 0; | 30 virtual std::wstring GetInputString() const = 0; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 virtual LocationBarTesting* GetLocationBarForTesting() = 0; | 71 virtual LocationBarTesting* GetLocationBarForTesting() = 0; |
| 71 }; | 72 }; |
| 72 | 73 |
| 73 class LocationBarTesting { | 74 class LocationBarTesting { |
| 74 public: | 75 public: |
| 75 // Returns the total number of page actions in the Omnibox. | 76 // Returns the total number of page actions in the Omnibox. |
| 76 virtual int PageActionCount() = 0; | 77 virtual int PageActionCount() = 0; |
| 77 | 78 |
| 78 // Returns the number of visible page actions in the Omnibox. | 79 // Returns the number of visible page actions in the Omnibox. |
| 79 virtual int PageActionVisibleCount() = 0; | 80 virtual int PageActionVisibleCount() = 0; |
| 81 |
| 82 // Returns the ExtensionAction at |index|. |
| 83 virtual ExtensionAction* GetPageAction(size_t index) = 0; |
| 84 |
| 85 // Returns the visible ExtensionAction at |index|. |
| 86 virtual ExtensionAction* GetVisiblePageAction(size_t index) = 0; |
| 87 |
| 88 // Simulates a left mouse pressed on the visible page action at |index|. |
| 89 virtual void TestPageActionPressed(size_t index) = 0; |
| 80 }; | 90 }; |
| 81 | 91 |
| 82 #endif // CHROME_BROWSER_LOCATION_BAR_H_ | 92 #endif // CHROME_BROWSER_LOCATION_BAR_H_ |
| OLD | NEW |