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

Side by Side Diff: content/public/common/page_zoom.h

Issue 224733018: Changes to content/ to facilitate new zoom extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_COMMON_PAGE_ZOOM_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_PAGE_ZOOM_H_
6 #define CONTENT_PUBLIC_COMMON_PAGE_ZOOM_H_ 6 #define CONTENT_PUBLIC_COMMON_PAGE_ZOOM_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 21 matching lines...) Expand all
32 CONTENT_EXPORT extern const double kEpsilon; 32 CONTENT_EXPORT extern const double kEpsilon;
33 33
34 // Test if two zoom values (either zoom factors or zoom levels) should be 34 // Test if two zoom values (either zoom factors or zoom levels) should be
35 // considered equal. 35 // considered equal.
36 CONTENT_EXPORT bool ZoomValuesEqual(double value_a, double value_b); 36 CONTENT_EXPORT bool ZoomValuesEqual(double value_a, double value_b);
37 37
38 // Converts between zoom factors and levels. 38 // Converts between zoom factors and levels.
39 CONTENT_EXPORT double ZoomLevelToZoomFactor(double zoom_level); 39 CONTENT_EXPORT double ZoomLevelToZoomFactor(double zoom_level);
40 CONTENT_EXPORT double ZoomFactorToZoomLevel(double factor); 40 CONTENT_EXPORT double ZoomFactorToZoomLevel(double factor);
41 41
42 // Defines how zoom changes are handled.
Charlie Reis 2014/04/10 18:57:48 This belongs at the top of the file since it affec
43 // |kZoomModeDefault| results in default zoom behavior, i.e. zoom changes are
44 // handled automatically and on a per-origin basis, meaning that other
45 // tabs navigated to the same origin will also zoom.
46 // |kZoomModeIsolated| results in zoom changes being handled automatically,
Charlie Reis 2014/04/10 18:57:48 kZoomModePerTab would be more accurate. Isolated
47 // but on a per-tab basis. Tabs in this zoom mode will not be affected by
Charlie Reis 2014/04/10 18:57:48 Does this continue to apply after cross-origin or
48 // zoom changes in other tabs, and vice versa.
49 // |kZoomModeManual| overrides the automatic handling of zoom changes. The
50 // NOTIFICATION_WEB_CONTENTS_ZOOM_CHANGE notification will still be
jam 2014/04/10 21:45:45 this seems like an old comment since you switched
51 // dispatched, but the page will not actually be zoomed. These zoom changes
52 // can be handled manually by listening for that notification. Zooming in
53 // this mode is also on a per-tab basis.
54 // |kZoomModeDisabled| disables all zooming in this tab. The tab will revert
55 // to default (100%) zoom, and all attempted zoom changes will be ignored.
56 enum ZoomMode {
57 kZoomModeDefault,
58 kZoomModeIsolated,
jam 2014/04/10 21:45:45 this really seems like the same concept of HostZoo
59 kZoomModeManual,
60 kZoomModeDisabled,
jam 2014/04/10 21:45:45 this appears to have the same problem as the above
61 };
62
42 } // namespace content 63 } // namespace content
43 64
44 #endif // CONTENT_PUBLIC_COMMON_PAGE_ZOOM_H_ 65 #endif // CONTENT_PUBLIC_COMMON_PAGE_ZOOM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698