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 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 virtual void SaveStateToContents(TabContents* contents) = 0; | 57 virtual void SaveStateToContents(TabContents* contents) = 0; |
58 | 58 |
59 // Reverts the location bar. The bar's permanent text will be shown. | 59 // Reverts the location bar. The bar's permanent text will be shown. |
60 virtual void Revert() = 0; | 60 virtual void Revert() = 0; |
61 | 61 |
62 // Returns a pointer to the text entry view. | 62 // Returns a pointer to the text entry view. |
63 virtual AutocompleteEditView* location_entry() = 0; | 63 virtual AutocompleteEditView* location_entry() = 0; |
64 | 64 |
65 // Returns a pointer to the testing interface. | 65 // Returns a pointer to the testing interface. |
66 virtual LocationBarTesting* GetLocationBarForTesting() = 0; | 66 virtual LocationBarTesting* GetLocationBarForTesting() = 0; |
67 | |
68 protected: | |
69 ~LocationBar() {} | |
70 }; | 67 }; |
71 | 68 |
72 class LocationBarTesting { | 69 class LocationBarTesting { |
73 public: | 70 public: |
74 // Returns the number of visible page actions in the Omnibox. | 71 // Returns the number of visible page actions in the Omnibox. |
75 virtual int PageActionVisibleCount() = 0; | 72 virtual int PageActionVisibleCount() = 0; |
76 protected: | |
77 ~LocationBarTesting() {} | |
78 }; | 73 }; |
79 | 74 |
80 #endif // CHROME_BROWSER_LOCATION_BAR_H_ | 75 #endif // CHROME_BROWSER_LOCATION_BAR_H_ |
OLD | NEW |