OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // Updates the state of the page actions. | 57 // Updates the state of the page actions. |
58 virtual void UpdatePageActions() = 0; | 58 virtual void UpdatePageActions() = 0; |
59 | 59 |
60 // Called when the page-action data needs to be refreshed, e.g. when an | 60 // Called when the page-action data needs to be refreshed, e.g. when an |
61 // extension is unloaded or crashes. | 61 // extension is unloaded or crashes. |
62 virtual void InvalidatePageActions() = 0; | 62 virtual void InvalidatePageActions() = 0; |
63 | 63 |
64 // Updates the state of the button to open a PDF in Adobe Reader. | 64 // Updates the state of the button to open a PDF in Adobe Reader. |
65 virtual void UpdateOpenPDFInReaderPrompt() = 0; | 65 virtual void UpdateOpenPDFInReaderPrompt() = 0; |
66 | 66 |
67 // Updates the Autofill credit card view. This views serves as an anchor for | 67 // Updates the generated credit card view. This view serves as an anchor for |
68 // the Autofill credit card bubble, which might show on successful run of the | 68 // the generated credit card bubble, which can show on successful generation |
69 // Autofill dialog. | 69 // of a new credit card number. |
70 virtual void UpdateAutofillCreditCardView() = 0; | 70 virtual void UpdateGeneratedCreditCardView() = 0; |
71 | 71 |
72 // Saves the state of the location bar to the specified WebContents, so that | 72 // Saves the state of the location bar to the specified WebContents, so that |
73 // it can be restored later. (Done when switching tabs). | 73 // it can be restored later. (Done when switching tabs). |
74 virtual void SaveStateToContents(content::WebContents* contents) = 0; | 74 virtual void SaveStateToContents(content::WebContents* contents) = 0; |
75 | 75 |
76 // Reverts the location bar. The bar's permanent text will be shown. | 76 // Reverts the location bar. The bar's permanent text will be shown. |
77 virtual void Revert() = 0; | 77 virtual void Revert() = 0; |
78 | 78 |
79 // Returns a pointer to the text entry view. | 79 // Returns a pointer to the text entry view. |
80 virtual const OmniboxView* GetLocationEntry() const = 0; | 80 virtual const OmniboxView* GetLocationEntry() const = 0; |
(...skipping 24 matching lines...) Expand all Loading... |
105 virtual void TestPageActionPressed(size_t index) = 0; | 105 virtual void TestPageActionPressed(size_t index) = 0; |
106 | 106 |
107 // Returns whether or not the bookmark star decoration is visible. | 107 // Returns whether or not the bookmark star decoration is visible. |
108 virtual bool GetBookmarkStarVisibility() = 0; | 108 virtual bool GetBookmarkStarVisibility() = 0; |
109 | 109 |
110 protected: | 110 protected: |
111 virtual ~LocationBarTesting() {} | 111 virtual ~LocationBarTesting() {} |
112 }; | 112 }; |
113 | 113 |
114 #endif // CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_H_ | 114 #endif // CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_H_ |
OLD | NEW |