zoomToContentSize -> zoomToPageWidth

This commit is contained in:
Kevin Sawicki 2016-10-27 11:29:51 -07:00
parent 7896ee23a2
commit 7916981da2
5 changed files with 9 additions and 9 deletions

View file

@ -117,7 +117,7 @@ class NativeWindowMac : public NativeWindow,
}; };
TitleBarStyle title_bar_style() const { return title_bar_style_; } TitleBarStyle title_bar_style() const { return title_bar_style_; }
bool zoom_to_content_size() const { return zoom_to_content_size_; } bool zoom_to_page_width() const { return zoom_to_page_width_; }
protected: protected:
// Return a vector of non-draggable regions that fill a window of size // Return a vector of non-draggable regions that fill a window of size
@ -157,7 +157,7 @@ class NativeWindowMac : public NativeWindow,
bool is_kiosk_; bool is_kiosk_;
bool zoom_to_content_size_; bool zoom_to_page_width_;
NSInteger attention_request_id_; // identifier from requestUserAttention NSInteger attention_request_id_; // identifier from requestUserAttention

View file

@ -106,7 +106,7 @@ bool ScopedDisableResize::disable_resize_ = false;
// menu) to determine the "standard size" of the window. // menu) to determine the "standard size" of the window.
- (NSRect)windowWillUseStandardFrame:(NSWindow*)window - (NSRect)windowWillUseStandardFrame:(NSWindow*)window
defaultFrame:(NSRect)frame { defaultFrame:(NSRect)frame {
if (!shell_->zoom_to_content_size()) if (!shell_->zoom_to_page_width())
return frame; return frame;
// If the shift key is down, maximize. // If the shift key is down, maximize.
@ -630,7 +630,7 @@ NativeWindowMac::NativeWindowMac(
NativeWindow* parent) NativeWindow* parent)
: NativeWindow(web_contents, options, parent), : NativeWindow(web_contents, options, parent),
is_kiosk_(false), is_kiosk_(false),
zoom_to_content_size_(false), zoom_to_page_width_(false),
attention_request_id_(0), attention_request_id_(0),
title_bar_style_(NORMAL) { title_bar_style_(NORMAL) {
int width = 800, height = 600; int width = 800, height = 600;
@ -753,7 +753,7 @@ NativeWindowMac::NativeWindowMac(
if (!has_frame() || !use_content_size) if (!has_frame() || !use_content_size)
SetSize(gfx::Size(width, height)); SetSize(gfx::Size(width, height));
options.Get(options::kZoomToContentSize, &zoom_to_content_size_); options.Get(options::kZoomToPageWidth, &zoom_to_page_width_);
// Enable the NSView to accept first mouse event. // Enable the NSView to accept first mouse event.
bool acceptsFirstMouse = false; bool acceptsFirstMouse = false;

View file

@ -45,8 +45,8 @@ const char kAcceptFirstMouse[] = "acceptFirstMouse";
// Whether window size should include window frame. // Whether window size should include window frame.
const char kUseContentSize[] = "useContentSize"; const char kUseContentSize[] = "useContentSize";
// Whether window zoom should be to content size. // Whether window zoom should be to page width.
const char kZoomToContentSize[] = "zoomToContentSize"; const char kZoomToPageWidth[] = "zoomToPageWidth";
// The requested title bar style for the window // The requested title bar style for the window
const char kTitleBarStyle[] = "titleBarStyle"; const char kTitleBarStyle[] = "titleBarStyle";

View file

@ -34,7 +34,7 @@ extern const char kKiosk[];
extern const char kAlwaysOnTop[]; extern const char kAlwaysOnTop[];
extern const char kAcceptFirstMouse[]; extern const char kAcceptFirstMouse[];
extern const char kUseContentSize[]; extern const char kUseContentSize[];
extern const char kZoomToContentSize[]; extern const char kZoomToPageWidth[];
extern const char kTitleBarStyle[]; extern const char kTitleBarStyle[];
extern const char kAutoHideMenuBar[]; extern const char kAutoHideMenuBar[];
extern const char kEnableLargerThanScreen[]; extern const char kEnableLargerThanScreen[];

View file

@ -205,7 +205,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
* `vibrancy` String - Add a type of vibrancy effect to the window, only on * `vibrancy` String - Add a type of vibrancy effect to the window, only on
macOS. Can be `appearance-based`, `light`, `dark`, `titlebar`, `selection`, macOS. Can be `appearance-based`, `light`, `dark`, `titlebar`, `selection`,
`menu`, `popover`, `sidebar`, `medium-light` or `ultra-dark`. `menu`, `popover`, `sidebar`, `medium-light` or `ultra-dark`.
* `zoomToContentSize` Boolean - The zoom behavior on macOS, accessible by * `zoomToPageWidth` Boolean - The zoom behavior on macOS, accessible by
option-clicking the green stoplight button on the toolbar or running the option-clicking the green stoplight button on the toolbar or running the
Window > Zoom menu item. If `true`, the window will grow to the width of the Window > Zoom menu item. If `true`, the window will grow to the width of the
web page, `false` will cause it to zoom to the width of the screen. This web page, `false` will cause it to zoom to the width of the screen. This