Fix building on OS X

This commit is contained in:
Cheng Zhao 2015-08-25 20:55:07 +08:00
parent c3e1ceaf61
commit eb709a9a8f
3 changed files with 5 additions and 8 deletions

View file

@ -2,6 +2,7 @@
#import <AppKit/AppKit.h>
#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)];
}
}

View file

@ -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

View file

@ -2,7 +2,6 @@
#import <QuartzCore/QuartzCore.h>
#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.