Make tabbing identifier var local
authorKevin Sawicki <kevinsawicki@gmail.com>
Thu, 30 Mar 2017 20:47:11 +0000 (13:47 -0700)
committerKevin Sawicki <kevinsawicki@gmail.com>
Thu, 30 Mar 2017 20:47:11 +0000 (13:47 -0700)
atom/browser/native_window_mac.h
atom/browser/native_window_mac.mm

index 066bcc5..bd34993 100644 (file)
@@ -179,8 +179,6 @@ class NativeWindowMac : public NativeWindow,
   // The "titleBarStyle" option.
   TitleBarStyle title_bar_style_;
 
-  std::string tabbing_identifier_;
-
   DISALLOW_COPY_AND_ASSIGN(NativeWindowMac);
 };
 
index 077eee5..2912022 100644 (file)
@@ -690,7 +690,8 @@ NativeWindowMac::NativeWindowMac(
 
   options.Get(options::kTitleBarStyle, &title_bar_style_);
 
-  options.Get(options::kTabbingIdentifier, &tabbing_identifier_);
+  std::string tabbingIdentifier;
+  options.Get(options::kTabbingIdentifier, &tabbingIdentifier);
 
   std::string windowType;
   options.Get(options::kType, &windowType);
@@ -766,13 +767,13 @@ NativeWindowMac::NativeWindowMac(
 
   // Create a tab only if tabbing identifier is specified and window has
   // a native title bar.
-  if (tabbing_identifier_.empty() || transparent() || !has_frame()) {
+  if (tabbingIdentifier.empty() || transparent() || !has_frame()) {
     if ([window_ respondsToSelector:@selector(tabbingMode)]) {
       [window_ setTabbingMode:NSWindowTabbingModeDisallowed];
     }
   } else {
     if ([window_ respondsToSelector:@selector(tabbingIdentifier)]) {
-      [window_ setTabbingIdentifier:base::SysUTF8ToNSString(tabbing_identifier_)];
+      [window_ setTabbingIdentifier:base::SysUTF8ToNSString(tabbingIdentifier)];
     }
   }