Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / webui / theme_handler.h
blob98d27332badfcabeadd0f7ed044f9380d32eac40
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_WEBUI_THEME_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_THEME_HANDLER_H_
8 #include "content/public/browser/notification_observer.h"
9 #include "content/public/browser/notification_registrar.h"
10 #include "content/public/browser/web_ui_message_handler.h"
12 class Profile;
14 namespace content {
15 class WebUI;
18 // A class to keep the ThemeSource up to date when theme changes.
19 class ThemeHandler : public content::WebUIMessageHandler,
20 public content::NotificationObserver {
21 public:
22 explicit ThemeHandler();
23 virtual ~ThemeHandler();
25 private:
26 // content::WebUIMessageHandler implementation.
27 virtual void RegisterMessages() OVERRIDE;
29 // Re/set the CSS caches.
30 void InitializeCSSCaches();
32 // content::NotificationObserver implementation.
33 virtual void Observe(int type,
34 const content::NotificationSource& source,
35 const content::NotificationDetails& details) OVERRIDE;
37 Profile* GetProfile() const;
39 content::NotificationRegistrar registrar_;
41 DISALLOW_COPY_AND_ASSIGN(ThemeHandler);
44 #endif // CHROME_BROWSER_UI_WEBUI_THEME_HANDLER_H_