Use new devtools structure in brightray.

Fixes #210.
Fixes #275.
This commit is contained in:
Cheng Zhao 2014-07-02 16:38:11 +08:00
parent 2cc2fd03fa
commit 949821f255
4 changed files with 8 additions and 12 deletions

View file

@ -520,6 +520,12 @@ void NativeWindowMac::HandleKeyboardEvent(
void NativeWindowMac::InstallView() {
NSView* view = inspectable_web_contents()->GetView()->GetNativeView();
if (has_frame_) {
// Add layer with white background for the contents view.
base::scoped_nsobject<CALayer> layer([[CALayer alloc] init]);
[layer setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)];
[view setLayer:layer];
[view setWantsLayer:YES];
[view setFrame:[[window_ contentView] bounds]];
[[window_ contentView] addSubview:view];
} else {