| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_DOM_UI_OPTIONS_OPTIONS_UI_H_ | 5 #ifndef CHROME_BROWSER_DOM_UI_OPTIONS_OPTIONS_UI_H_ |
| 6 #define CHROME_BROWSER_DOM_UI_OPTIONS_OPTIONS_UI_H_ | 6 #define CHROME_BROWSER_DOM_UI_OPTIONS_OPTIONS_UI_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 // The base class handler of Javascript messages of options pages. | 42 // The base class handler of Javascript messages of options pages. |
| 43 class OptionsPageUIHandler : public DOMMessageHandler, | 43 class OptionsPageUIHandler : public DOMMessageHandler, |
| 44 public NotificationObserver { | 44 public NotificationObserver { |
| 45 public: | 45 public: |
| 46 OptionsPageUIHandler(); | 46 OptionsPageUIHandler(); |
| 47 virtual ~OptionsPageUIHandler(); | 47 virtual ~OptionsPageUIHandler(); |
| 48 | 48 |
| 49 // Is this handler enabled? | 49 // Is this handler enabled? |
| 50 virtual bool IsEnabled() { return true; } | 50 virtual bool IsEnabled(); |
| 51 | 51 |
| 52 // Collects localized strings for options page. | 52 // Collects localized strings for options page. |
| 53 virtual void GetLocalizedValues(DictionaryValue* localized_strings) = 0; | 53 virtual void GetLocalizedValues(DictionaryValue* localized_strings) = 0; |
| 54 | 54 |
| 55 // Initialize the page. Called once the DOM is available for manipulation. | 55 // Initialize the page. Called once the DOM is available for manipulation. |
| 56 virtual void Initialize() {} | 56 virtual void Initialize() {} |
| 57 | 57 |
| 58 // Uninitializes the page. Called just before the object is destructed. | 58 // Uninitializes the page. Called just before the object is destructed. |
| 59 virtual void Uninitialize() {} | 59 virtual void Uninitialize() {} |
| 60 | 60 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 88 | 88 |
| 89 private: | 89 private: |
| 90 // Adds OptionsPageUiHandler to the handlers list if handler is enabled. | 90 // Adds OptionsPageUiHandler to the handlers list if handler is enabled. |
| 91 void AddOptionsPageUIHandler(DictionaryValue* localized_strings, | 91 void AddOptionsPageUIHandler(DictionaryValue* localized_strings, |
| 92 OptionsPageUIHandler* handler); | 92 OptionsPageUIHandler* handler); |
| 93 | 93 |
| 94 DISALLOW_COPY_AND_ASSIGN(OptionsUI); | 94 DISALLOW_COPY_AND_ASSIGN(OptionsUI); |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 #endif // CHROME_BROWSER_DOM_UI_OPTIONS_OPTIONS_UI_H_ | 97 #endif // CHROME_BROWSER_DOM_UI_OPTIONS_OPTIONS_UI_H_ |
| OLD | NEW |