| 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 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 13 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
| 14 #include "chrome/browser/ui/webui/chrome_web_ui.h" | 14 #include "chrome/browser/ui/webui/chrome_web_ui.h" |
| 15 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
| 16 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
| 17 #include "content/public/browser/notification_types.h" | 17 #include "content/public/browser/notification_types.h" |
| 18 #include "content/public/browser/web_ui_message_handler.h" |
| 18 | 19 |
| 19 namespace options2 { | 20 namespace options2 { |
| 20 | 21 |
| 21 // The base class handler of Javascript messages of options pages. | 22 // The base class handler of Javascript messages of options pages. |
| 22 class OptionsPageUIHandler : public WebUIMessageHandler, | 23 class OptionsPageUIHandler : public content::WebUIMessageHandler, |
| 23 public content::NotificationObserver { | 24 public content::NotificationObserver { |
| 24 public: | 25 public: |
| 25 OptionsPageUIHandler(); | 26 OptionsPageUIHandler(); |
| 26 virtual ~OptionsPageUIHandler(); | 27 virtual ~OptionsPageUIHandler(); |
| 27 | 28 |
| 28 // Is this handler enabled? | 29 // Is this handler enabled? |
| 29 virtual bool IsEnabled(); | 30 virtual bool IsEnabled(); |
| 30 | 31 |
| 31 // Collects localized strings for options page. | 32 // Collects localized strings for options page. |
| 32 virtual void GetLocalizedValues(base::DictionaryValue* localized_strings) = 0; | 33 virtual void GetLocalizedValues(base::DictionaryValue* localized_strings) = 0; |
| 33 | 34 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 void SetCommandLineString(RenderViewHost* render_view_host); | 107 void SetCommandLineString(RenderViewHost* render_view_host); |
| 107 | 108 |
| 108 bool initialized_handlers_; | 109 bool initialized_handlers_; |
| 109 | 110 |
| 110 DISALLOW_COPY_AND_ASSIGN(OptionsUI); | 111 DISALLOW_COPY_AND_ASSIGN(OptionsUI); |
| 111 }; | 112 }; |
| 112 | 113 |
| 113 } // namespace options2 | 114 } // namespace options2 |
| 114 | 115 |
| 115 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_OPTIONS_UI2_H_ | 116 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_OPTIONS_UI2_H_ |
| OLD | NEW |