refactor: convert C++ enums to C++11 enum classes (#18087)

This commit is contained in:
Milan Burda 2019-05-03 20:11:41 +02:00 committed by Alexey Kuzmin
parent a59dc56fa6
commit c25c31e018
36 changed files with 199 additions and 204 deletions

View file

@ -32,23 +32,23 @@ class WebContentsZoomController
};
// Defines how zoom changes are handled.
enum ZoomMode {
enum class ZoomMode {
// Results in default zoom behavior, i.e. zoom changes are handled
// automatically and on a per-origin basis, meaning that other tabs
// navigated to the same origin will also zoom.
ZOOM_MODE_DEFAULT,
DEFAULT,
// Results in zoom changes being handled automatically, but on a per-tab
// basis. Tabs in this zoom mode will not be affected by zoom changes in
// other tabs, and vice versa.
ZOOM_MODE_ISOLATED,
ISOLATED,
// Overrides the automatic handling of zoom changes. The |onZoomChange|
// event will still be dispatched, but the page will not actually be zoomed.
// These zoom changes can be handled manually by listening for the
// |onZoomChange| event. Zooming in this mode is also on a per-tab basis.
ZOOM_MODE_MANUAL,
MANUAL,
// Disables all zooming in this tab. The tab will revert to the default
// zoom level, and all attempted zoom changes will be ignored.
ZOOM_MODE_DISABLED,
DISABLED,
};
explicit WebContentsZoomController(content::WebContents* web_contents);
@ -95,7 +95,7 @@ class WebContentsZoomController
void SetZoomFactorOnNavigationIfNeeded(const GURL& url);
// The current zoom mode.
ZoomMode zoom_mode_ = ZOOM_MODE_DEFAULT;
ZoomMode zoom_mode_ = ZoomMode::DEFAULT;
// Current zoom level.
double zoom_level_ = 1.0;