diff --git a/brightray/browser/inspectable_web_contents_view_mac.mm b/brightray/browser/inspectable_web_contents_view_mac.mm index e676653953eb..42ca3c6f3a15 100644 --- a/brightray/browser/inspectable_web_contents_view_mac.mm +++ b/brightray/browser/inspectable_web_contents_view_mac.mm @@ -2,6 +2,7 @@ #import +#include "base/strings/sys_string_conversions.h" #include "browser/inspectable_web_contents.h" #include "browser/inspectable_web_contents_view_delegate.h" #import "browser/mac/bry_inspectable_web_contents_view.h" @@ -51,7 +52,7 @@ void InspectableWebContentsViewMac::SetContentsResizingStrategy( } void InspectableWebContentsViewMac::SetTitle(const base::string16& title) { - [view_ setTitle:title]; + [view_ setTitle:base::SysUTF16ToNSString(title)]; } } diff --git a/brightray/browser/mac/bry_inspectable_web_contents_view.h b/brightray/browser/mac/bry_inspectable_web_contents_view.h index c3c5a1ada0f1..b5dbb415e5b9 100644 --- a/brightray/browser/mac/bry_inspectable_web_contents_view.h +++ b/brightray/browser/mac/bry_inspectable_web_contents_view.h @@ -32,6 +32,6 @@ using brightray::InspectableWebContentsViewMac; - (BOOL)isDevToolsVisible; - (void)setIsDocked:(BOOL)docked; - (void)setContentsResizingStrategy:(const DevToolsContentsResizingStrategy&)strategy; -- (void)setTitle:(const base::string16&)title; +- (void)setTitle:(NSString*)title; @end diff --git a/brightray/browser/mac/bry_inspectable_web_contents_view.mm b/brightray/browser/mac/bry_inspectable_web_contents_view.mm index f2dac929739a..20267769e285 100644 --- a/brightray/browser/mac/bry_inspectable_web_contents_view.mm +++ b/brightray/browser/mac/bry_inspectable_web_contents_view.mm @@ -2,7 +2,6 @@ #import -#include "base/strings/sys_string_conversions.h" #include "browser/inspectable_web_contents_impl.h" #include "browser/inspectable_web_contents_view_mac.h" @@ -175,11 +174,8 @@ const CGFloat kRoundedCornerRadius = 4; [contentsView setFrame:[self flipRectToNSRect:new_contents_bounds]]; } -- (void)setTitle:(const base::string16&)title { - if (devtools_window_) { - NSString* title_string = base::SysUTF16ToNSString(title); - [devtools_window_ setTitle:title_string]; - } +- (void)setTitle:(NSString*)title { + [devtools_window_ setTitle:title]; } // Creates a path whose bottom two corners are rounded.