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

Side by Side Diff: extensions/browser/extension_zoom_request_client.h

Issue 1909773002: Convert //extensions/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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 EXTENSIONS_BROWSER_EXTENSION_ZOOM_REQUEST_CLIENT_H_ 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_ZOOM_REQUEST_CLIENT_H_
6 #define EXTENSIONS_BROWSER_EXTENSION_ZOOM_REQUEST_CLIENT_H_ 6 #define EXTENSIONS_BROWSER_EXTENSION_ZOOM_REQUEST_CLIENT_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "components/ui/zoom/zoom_controller.h" 11 #include "components/ui/zoom/zoom_controller.h"
11 #include "extensions/common/extension.h" 12 #include "extensions/common/extension.h"
12 13
13 namespace extensions { 14 namespace extensions {
14 15
15 class Extension; 16 class Extension;
16 17
17 // This class implements ZoomRequestClient in order to encapsulate a ref pointer 18 // This class implements ZoomRequestClient in order to encapsulate a ref pointer
18 // back to an extension requesting a zoom level change. This is important so 19 // back to an extension requesting a zoom level change. This is important so
19 // that zoom event observers can determine if an extension made the request 20 // that zoom event observers can determine if an extension made the request
20 // as opposed to direct user input. 21 // as opposed to direct user input.
21 class ExtensionZoomRequestClient : public ui_zoom::ZoomRequestClient { 22 class ExtensionZoomRequestClient : public ui_zoom::ZoomRequestClient {
22 public: 23 public:
23 explicit ExtensionZoomRequestClient(scoped_refptr<const Extension> extension); 24 explicit ExtensionZoomRequestClient(scoped_refptr<const Extension> extension);
24 25
25 bool ShouldSuppressBubble() const override; 26 bool ShouldSuppressBubble() const override;
26 const Extension* extension() const { return extension_.get(); } 27 const Extension* extension() const { return extension_.get(); }
27 28
28 private: 29 private:
29 ~ExtensionZoomRequestClient() override; 30 ~ExtensionZoomRequestClient() override;
30 scoped_refptr<const Extension> extension_; 31 scoped_refptr<const Extension> extension_;
31 32
32 DISALLOW_COPY_AND_ASSIGN(ExtensionZoomRequestClient); 33 DISALLOW_COPY_AND_ASSIGN(ExtensionZoomRequestClient);
33 }; 34 };
34 35
35 } // namespace extensions 36 } // namespace extensions
36 37
37 #endif // EXTENSIONS_BROWSER_EXTENSION_ZOOM_REQUEST_CLIENT_H_ 38 #endif // EXTENSIONS_BROWSER_EXTENSION_ZOOM_REQUEST_CLIENT_H_
OLDNEW
« no previous file with comments | « extensions/browser/extension_user_script_loader.cc ('k') | extensions/browser/extensions_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698