Make tabbing identifier var local

This commit is contained in:
Kevin Sawicki 2017-03-30 13:47:11 -07:00
parent e699e88b4c
commit 42300ae58e
2 changed files with 4 additions and 5 deletions

View file

@ -179,8 +179,6 @@ class NativeWindowMac : public NativeWindow,
// The "titleBarStyle" option. // The "titleBarStyle" option.
TitleBarStyle title_bar_style_; TitleBarStyle title_bar_style_;
std::string tabbing_identifier_;
DISALLOW_COPY_AND_ASSIGN(NativeWindowMac); DISALLOW_COPY_AND_ASSIGN(NativeWindowMac);
}; };

View file

@ -690,7 +690,8 @@ NativeWindowMac::NativeWindowMac(
options.Get(options::kTitleBarStyle, &title_bar_style_); options.Get(options::kTitleBarStyle, &title_bar_style_);
options.Get(options::kTabbingIdentifier, &tabbing_identifier_); std::string tabbingIdentifier;
options.Get(options::kTabbingIdentifier, &tabbingIdentifier);
std::string windowType; std::string windowType;
options.Get(options::kType, &windowType); options.Get(options::kType, &windowType);
@ -766,13 +767,13 @@ NativeWindowMac::NativeWindowMac(
// Create a tab only if tabbing identifier is specified and window has // Create a tab only if tabbing identifier is specified and window has
// a native title bar. // a native title bar.
if (tabbing_identifier_.empty() || transparent() || !has_frame()) { if (tabbingIdentifier.empty() || transparent() || !has_frame()) {
if ([window_ respondsToSelector:@selector(tabbingMode)]) { if ([window_ respondsToSelector:@selector(tabbingMode)]) {
[window_ setTabbingMode:NSWindowTabbingModeDisallowed]; [window_ setTabbingMode:NSWindowTabbingModeDisallowed];
} }
} else { } else {
if ([window_ respondsToSelector:@selector(tabbingIdentifier)]) { if ([window_ respondsToSelector:@selector(tabbingIdentifier)]) {
[window_ setTabbingIdentifier:base::SysUTF8ToNSString(tabbing_identifier_)]; [window_ setTabbingIdentifier:base::SysUTF8ToNSString(tabbingIdentifier)];
} }
} }