| 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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 // Initialize the page. Called once the DOM is available for manipulation. | 60 // Initialize the page. Called once the DOM is available for manipulation. |
| 61 // This will be called when a RenderView is re-used (when navigated to with | 61 // This will be called when a RenderView is re-used (when navigated to with |
| 62 // back/forward or session restored in some cases) or when created. | 62 // back/forward or session restored in some cases) or when created. |
| 63 virtual void InitializePage() {} | 63 virtual void InitializePage() {} |
| 64 | 64 |
| 65 // Uninitializes the page. Called just before the object is destructed. | 65 // Uninitializes the page. Called just before the object is destructed. |
| 66 virtual void Uninitialize() {} | 66 virtual void Uninitialize() {} |
| 67 | 67 |
| 68 // WebUIMessageHandler implementation. | 68 // WebUIMessageHandler implementation. |
| 69 virtual void RegisterMessages() OVERRIDE {} | 69 virtual void RegisterMessages() override {} |
| 70 | 70 |
| 71 protected: | 71 protected: |
| 72 struct OptionsStringResource { | 72 struct OptionsStringResource { |
| 73 // The name of the resource in templateData. | 73 // The name of the resource in templateData. |
| 74 const char* name; | 74 const char* name; |
| 75 // The .grd ID for the resource (IDS_*). | 75 // The .grd ID for the resource (IDS_*). |
| 76 int id; | 76 int id; |
| 77 // The .grd ID of the string to replace $1 in |id|'s string. If zero or | 77 // The .grd ID of the string to replace $1 in |id|'s string. If zero or |
| 78 // omitted (default initialized), no substitution is attempted. | 78 // omitted (default initialized), no substitution is attempted. |
| 79 int substitution_id; | 79 int substitution_id; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 base::ListValue* const suggestions); | 129 base::ListValue* const suggestions); |
| 130 | 130 |
| 131 static base::RefCountedMemory* GetFaviconResourceBytes( | 131 static base::RefCountedMemory* GetFaviconResourceBytes( |
| 132 ui::ScaleFactor scale_factor); | 132 ui::ScaleFactor scale_factor); |
| 133 | 133 |
| 134 // Overridden from content::WebContentsObserver: | 134 // Overridden from content::WebContentsObserver: |
| 135 virtual void DidStartProvisionalLoadForFrame( | 135 virtual void DidStartProvisionalLoadForFrame( |
| 136 content::RenderFrameHost* render_frame_host, | 136 content::RenderFrameHost* render_frame_host, |
| 137 const GURL& validated_url, | 137 const GURL& validated_url, |
| 138 bool is_error_page, | 138 bool is_error_page, |
| 139 bool is_iframe_srcdoc) OVERRIDE; | 139 bool is_iframe_srcdoc) override; |
| 140 | 140 |
| 141 // Overridden from OptionsPageUIHandlerHost: | 141 // Overridden from OptionsPageUIHandlerHost: |
| 142 virtual void InitializeHandlers() OVERRIDE; | 142 virtual void InitializeHandlers() override; |
| 143 virtual void OnFinishedLoading() OVERRIDE; | 143 virtual void OnFinishedLoading() override; |
| 144 | 144 |
| 145 private: | 145 private: |
| 146 // Adds OptionsPageUiHandler to the handlers list if handler is enabled. | 146 // Adds OptionsPageUiHandler to the handlers list if handler is enabled. |
| 147 void AddOptionsPageUIHandler(base::DictionaryValue* localized_strings, | 147 void AddOptionsPageUIHandler(base::DictionaryValue* localized_strings, |
| 148 OptionsPageUIHandler* handler); | 148 OptionsPageUIHandler* handler); |
| 149 | 149 |
| 150 bool initialized_handlers_; | 150 bool initialized_handlers_; |
| 151 | 151 |
| 152 std::vector<OptionsPageUIHandler*> handlers_; | 152 std::vector<OptionsPageUIHandler*> handlers_; |
| 153 OnFinishedLoadingCallbackList on_finished_loading_callbacks_; | 153 OnFinishedLoadingCallbackList on_finished_loading_callbacks_; |
| 154 | 154 |
| 155 #if defined(OS_CHROMEOS) | 155 #if defined(OS_CHROMEOS) |
| 156 scoped_ptr<chromeos::system::PointerDeviceObserver> | 156 scoped_ptr<chromeos::system::PointerDeviceObserver> |
| 157 pointer_device_observer_; | 157 pointer_device_observer_; |
| 158 #endif | 158 #endif |
| 159 | 159 |
| 160 DISALLOW_COPY_AND_ASSIGN(OptionsUI); | 160 DISALLOW_COPY_AND_ASSIGN(OptionsUI); |
| 161 }; | 161 }; |
| 162 | 162 |
| 163 } // namespace options | 163 } // namespace options |
| 164 | 164 |
| 165 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_ | 165 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_ |
| OLD | NEW |