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