Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(583)

Side by Side Diff: chrome/browser/ui/webui/settings/appearance_handler.h

Issue 1839293002: MD Settings: simplify logic for whether themes can be reset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simpler Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/appearance_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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_SETTINGS_APPEARANCE_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_APPEARANCE_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_APPEARANCE_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_APPEARANCE_HANDLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h" 9 #include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h"
10 #include "content/public/browser/notification_observer.h" 10 #include "content/public/browser/notification_observer.h"
(...skipping 20 matching lines...) Expand all
31 31
32 // SettingsPageUIHandler implementation. 32 // SettingsPageUIHandler implementation.
33 void RegisterMessages() override; 33 void RegisterMessages() override;
34 34
35 private: 35 private:
36 // content::NotificationObserver implementation. 36 // content::NotificationObserver implementation.
37 void Observe(int type, 37 void Observe(int type,
38 const content::NotificationSource& source, 38 const content::NotificationSource& source,
39 const content::NotificationDetails& details) override; 39 const content::NotificationDetails& details) override;
40 40
41 // Queries the enabled state of the reset-theme control. 41 // Whether the theme can be reset.
42 base::FundamentalValue QueryResetThemeEnabledState(); 42 bool ResetThemeEnabled() const;
43 43
44 // Resets the UI theme of the browser to the default theme. 44 // Resets the UI theme of the browser to the default theme.
45 void ResetTheme(const base::ListValue*); 45 void ResetTheme(const base::ListValue*);
46 46
47 // Sends the enabled state of the reset-theme control to the JS. 47 // Sends the enabled state of the reset-theme control to the JS.
48 void GetResetThemeEnabled(const base::ListValue* args); 48 void GetResetThemeEnabled(const base::ListValue* args);
49 49
50 Profile* profile_; // Weak pointer. 50 Profile* profile_; // Weak pointer.
51 51
52 // Used to register for relevant notifications. 52 // Used to register for relevant notifications.
53 content::NotificationRegistrar registrar_; 53 content::NotificationRegistrar registrar_;
54 54
55 DISALLOW_COPY_AND_ASSIGN(AppearanceHandler); 55 DISALLOW_COPY_AND_ASSIGN(AppearanceHandler);
56 }; 56 };
57 57
58 } // namespace settings 58 } // namespace settings
59 59
60 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_APPEARANCE_HANDLER_H_ 60 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_APPEARANCE_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/appearance_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698