| 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 | 10 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 virtual void InitializeHandlers() = 0; | 74 virtual void InitializeHandlers() = 0; |
| 75 | 75 |
| 76 protected: | 76 protected: |
| 77 virtual ~OptionsPageUIHandlerHost() {} | 77 virtual ~OptionsPageUIHandlerHost() {} |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 // The WebUI for chrome:settings. | 80 // The WebUI for chrome:settings. |
| 81 class OptionsUI : public ChromeWebUI, | 81 class OptionsUI : public ChromeWebUI, |
| 82 public OptionsPageUIHandlerHost { | 82 public OptionsPageUIHandlerHost { |
| 83 public: | 83 public: |
| 84 explicit OptionsUI(TabContents* contents); | 84 explicit OptionsUI(content::WebContents* contents); |
| 85 virtual ~OptionsUI(); | 85 virtual ~OptionsUI(); |
| 86 | 86 |
| 87 static RefCountedMemory* GetFaviconResourceBytes(); | 87 static RefCountedMemory* GetFaviconResourceBytes(); |
| 88 | 88 |
| 89 // WebUI implementation. | 89 // WebUI implementation. |
| 90 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; | 90 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; |
| 91 virtual void RenderViewReused(RenderViewHost* render_view_host) OVERRIDE; | 91 virtual void RenderViewReused(RenderViewHost* render_view_host) OVERRIDE; |
| 92 virtual void DidBecomeActiveForReusedRenderView() OVERRIDE; | 92 virtual void DidBecomeActiveForReusedRenderView() OVERRIDE; |
| 93 | 93 |
| 94 // Overridden from OptionsPageUIHandlerHost: | 94 // Overridden from OptionsPageUIHandlerHost: |
| 95 virtual void InitializeHandlers() OVERRIDE; | 95 virtual void InitializeHandlers() OVERRIDE; |
| 96 | 96 |
| 97 private: | 97 private: |
| 98 // Adds OptionsPageUiHandler to the handlers list if handler is enabled. | 98 // Adds OptionsPageUiHandler to the handlers list if handler is enabled. |
| 99 void AddOptionsPageUIHandler(base::DictionaryValue* localized_strings, | 99 void AddOptionsPageUIHandler(base::DictionaryValue* localized_strings, |
| 100 OptionsPageUIHandler* handler); | 100 OptionsPageUIHandler* handler); |
| 101 | 101 |
| 102 // Sets the WebUI CommandLineString property with arguments passed while | 102 // Sets the WebUI CommandLineString property with arguments passed while |
| 103 // launching chrome. | 103 // launching chrome. |
| 104 void SetCommandLineString(RenderViewHost* render_view_host); | 104 void SetCommandLineString(RenderViewHost* render_view_host); |
| 105 | 105 |
| 106 bool initialized_handlers_; | 106 bool initialized_handlers_; |
| 107 | 107 |
| 108 DISALLOW_COPY_AND_ASSIGN(OptionsUI); | 108 DISALLOW_COPY_AND_ASSIGN(OptionsUI); |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_ | 111 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_ |
| OLD | NEW |