| 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 |
| 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 // The base class handler of Javascript messages of options pages. | 20 // The base class handler of Javascript messages of options pages. |
| 20 class OptionsPageUIHandler : public WebUIMessageHandler, | 21 class OptionsPageUIHandler : public content::WebUIMessageHandler, |
| 21 public content::NotificationObserver { | 22 public content::NotificationObserver { |
| 22 public: | 23 public: |
| 23 OptionsPageUIHandler(); | 24 OptionsPageUIHandler(); |
| 24 virtual ~OptionsPageUIHandler(); | 25 virtual ~OptionsPageUIHandler(); |
| 25 | 26 |
| 26 // Is this handler enabled? | 27 // Is this handler enabled? |
| 27 virtual bool IsEnabled(); | 28 virtual bool IsEnabled(); |
| 28 | 29 |
| 29 // Collects localized strings for options page. | 30 // Collects localized strings for options page. |
| 30 virtual void GetLocalizedValues(base::DictionaryValue* localized_strings) = 0; | 31 virtual void GetLocalizedValues(base::DictionaryValue* localized_strings) = 0; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // Sets the WebUI CommandLineString property with arguments passed while | 103 // Sets the WebUI CommandLineString property with arguments passed while |
| 103 // launching chrome. | 104 // launching chrome. |
| 104 void SetCommandLineString(RenderViewHost* render_view_host); | 105 void SetCommandLineString(RenderViewHost* render_view_host); |
| 105 | 106 |
| 106 bool initialized_handlers_; | 107 bool initialized_handlers_; |
| 107 | 108 |
| 108 DISALLOW_COPY_AND_ASSIGN(OptionsUI); | 109 DISALLOW_COPY_AND_ASSIGN(OptionsUI); |
| 109 }; | 110 }; |
| 110 | 111 |
| 111 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_ | 112 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_H_ |
| OLD | NEW |