Fix devtools.

This commit is contained in:
Cheng Zhao 2013-04-12 16:41:15 +08:00
parent f5e74e1b65
commit f62b00eaac
2 changed files with 5 additions and 5 deletions

View file

@ -83,7 +83,7 @@ void NativeWindow::ShowDevTools() {
} }
void NativeWindow::CloseDevTools() { void NativeWindow::CloseDevTools() {
// inspectable_web_contents()->CloseDevTools(); inspectable_web_contents()->GetView()->CloseDevTools();
} }
content::WebContents* NativeWindow::GetWebContents() const { content::WebContents* NativeWindow::GetWebContents() const {

View file

@ -12,6 +12,8 @@
#include "base/sys_string_conversions.h" #include "base/sys_string_conversions.h"
#include "base/values.h" #include "base/values.h"
#include "browser/atom_event_processing_window.h" #include "browser/atom_event_processing_window.h"
#include "brightray/browser/inspectable_web_contents.h"
#include "brightray/browser/inspectable_web_contents_view.h"
#include "common/options_switches.h" #include "common/options_switches.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h" #include "content/public/browser/web_contents_view.h"
@ -75,9 +77,6 @@ NativeWindowMac::NativeWindowMac(content::BrowserContext* browser_context,
[window() setCollectionBehavior:collectionBehavior]; [window() setCollectionBehavior:collectionBehavior];
} }
NSView* view = GetWebContents()->GetView()->GetNativeView();
[view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
InstallView(); InstallView();
} }
@ -295,7 +294,8 @@ bool NativeWindowMac::IsKiosk() {
} }
void NativeWindowMac::InstallView() { void NativeWindowMac::InstallView() {
NSView* view = GetWebContents()->GetView()->GetNativeView(); NSView* view = inspectable_web_contents()->GetView()->GetNativeView();
[view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
[view setFrame:[[window() contentView] bounds]]; [view setFrame:[[window() contentView] bounds]];
[[window() contentView] addSubview:view]; [[window() contentView] addSubview:view];
} }