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

Side by Side Diff: chrome/browser/ui/zoom/chrome_zoom_level_prefs.h

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_ZOOM_CHROME_ZOOM_LEVEL_PREFS_H_ 5 #ifndef CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_PREFS_H_
6 #define CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_PREFS_H_ 6 #define CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_PREFS_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 PrefService* pref_service, 45 PrefService* pref_service,
46 const base::FilePath& profile_path, 46 const base::FilePath& profile_path,
47 const base::FilePath& partition_path, 47 const base::FilePath& partition_path,
48 base::WeakPtr<ui_zoom::ZoomEventManager> zoom_event_manager); 48 base::WeakPtr<ui_zoom::ZoomEventManager> zoom_event_manager);
49 ~ChromeZoomLevelPrefs() override; 49 ~ChromeZoomLevelPrefs() override;
50 50
51 static std::string GetHashForTesting(const base::FilePath& relative_path); 51 static std::string GetHashForTesting(const base::FilePath& relative_path);
52 52
53 void SetDefaultZoomLevelPref(double level); 53 void SetDefaultZoomLevelPref(double level);
54 double GetDefaultZoomLevelPref() const; 54 double GetDefaultZoomLevelPref() const;
55 scoped_ptr<DefaultZoomLevelSubscription> RegisterDefaultZoomLevelCallback( 55 std::unique_ptr<DefaultZoomLevelSubscription>
56 const base::Closure& callback); 56 RegisterDefaultZoomLevelCallback(const base::Closure& callback);
57 57
58 void ExtractPerHostZoomLevels( 58 void ExtractPerHostZoomLevels(
59 const base::DictionaryValue* host_zoom_dictionary, 59 const base::DictionaryValue* host_zoom_dictionary,
60 bool sanitize_partition_host_zoom_levels); 60 bool sanitize_partition_host_zoom_levels);
61 61
62 // content::ZoomLevelDelegate 62 // content::ZoomLevelDelegate
63 void InitHostZoomMap(content::HostZoomMap* host_zoom_map) override; 63 void InitHostZoomMap(content::HostZoomMap* host_zoom_map) override;
64 64
65 private: 65 private:
66 // This is a callback function that receives notifications from HostZoomMap 66 // This is a callback function that receives notifications from HostZoomMap
67 // when per-host zoom levels change. It is used to update the per-host 67 // when per-host zoom levels change. It is used to update the per-host
68 // zoom levels (if any) managed by this class (for its associated partition). 68 // zoom levels (if any) managed by this class (for its associated partition).
69 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); 69 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change);
70 70
71 PrefService* pref_service_; 71 PrefService* pref_service_;
72 base::WeakPtr<ui_zoom::ZoomEventManager> zoom_event_manager_; 72 base::WeakPtr<ui_zoom::ZoomEventManager> zoom_event_manager_;
73 content::HostZoomMap* host_zoom_map_; 73 content::HostZoomMap* host_zoom_map_;
74 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; 74 std::unique_ptr<content::HostZoomMap::Subscription> zoom_subscription_;
75 std::string partition_key_; 75 std::string partition_key_;
76 base::CallbackList<void(void)> default_zoom_changed_callbacks_; 76 base::CallbackList<void(void)> default_zoom_changed_callbacks_;
77 77
78 DISALLOW_COPY_AND_ASSIGN(ChromeZoomLevelPrefs); 78 DISALLOW_COPY_AND_ASSIGN(ChromeZoomLevelPrefs);
79 }; 79 };
80 80
81 #endif // CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_PREFS_H_ 81 #endif // CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_PREFS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/zoom/chrome_zoom_level_otr_delegate.h ('k') | chrome/browser/ui/zoom/chrome_zoom_level_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698