| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // The WebUI for chrome:settings. | 82 // The WebUI for chrome:settings. |
| 83 class OptionsUI : public content::WebUIController, | 83 class OptionsUI : public content::WebUIController, |
| 84 public OptionsPageUIHandlerHost { | 84 public OptionsPageUIHandlerHost { |
| 85 public: | 85 public: |
| 86 explicit OptionsUI(content::WebUI* web_ui); | 86 explicit OptionsUI(content::WebUI* web_ui); |
| 87 virtual ~OptionsUI(); | 87 virtual ~OptionsUI(); |
| 88 | 88 |
| 89 static RefCountedMemory* GetFaviconResourceBytes(); | 89 static RefCountedMemory* GetFaviconResourceBytes(); |
| 90 | 90 |
| 91 // WebUIController implementation. | 91 // WebUIController implementation. |
| 92 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; | 92 virtual void RenderViewCreated( |
| 93 virtual void RenderViewReused(RenderViewHost* render_view_host) OVERRIDE; | 93 content::RenderViewHost* render_view_host) OVERRIDE; |
| 94 virtual void RenderViewReused( |
| 95 content::RenderViewHost* render_view_host) OVERRIDE; |
| 94 virtual void DidBecomeActiveForReusedRenderView() OVERRIDE; | 96 virtual void DidBecomeActiveForReusedRenderView() OVERRIDE; |
| 95 | 97 |
| 96 // Overridden from OptionsPageUIHandlerHost: | 98 // Overridden from OptionsPageUIHandlerHost: |
| 97 virtual void InitializeHandlers() OVERRIDE; | 99 virtual void InitializeHandlers() OVERRIDE; |
| 98 | 100 |
| 99 private: | 101 private: |
| 100 // Adds OptionsPageUiHandler to the handlers list if handler is enabled. | 102 // Adds OptionsPageUiHandler to the handlers list if handler is enabled. |
| 101 void AddOptionsPageUIHandler(base::DictionaryValue* localized_strings, | 103 void AddOptionsPageUIHandler(base::DictionaryValue* localized_strings, |
| 102 OptionsPageUIHandler* handler); | 104 OptionsPageUIHandler* handler); |
| 103 | 105 |
| 104 // Sets the WebUI CommandLineString property with arguments passed while | 106 // Sets the WebUI CommandLineString property with arguments passed while |
| 105 // launching chrome. | 107 // launching chrome. |
| 106 void SetCommandLineString(RenderViewHost* render_view_host); | 108 void SetCommandLineString(content::RenderViewHost* render_view_host); |
| 107 | 109 |
| 108 bool initialized_handlers_; | 110 bool initialized_handlers_; |
| 109 | 111 |
| 110 std::vector<OptionsPageUIHandler*> handlers_; | 112 std::vector<OptionsPageUIHandler*> handlers_; |
| 111 | 113 |
| 112 DISALLOW_COPY_AND_ASSIGN(OptionsUI); | 114 DISALLOW_COPY_AND_ASSIGN(OptionsUI); |
| 113 }; | 115 }; |
| 114 | 116 |
| 115 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_ | 117 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_ |
| OLD | NEW |