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

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

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

Powered by Google App Engine
This is Rietveld 408576698