| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/widget/native_widget_mac.h" | 5 #include "ui/views/widget/native_widget_mac.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 initWithContentRect:content_rect | 111 initWithContentRect:content_rect |
| 112 styleMask:style_mask | 112 styleMask:style_mask |
| 113 backing:NSBackingStoreBuffered | 113 backing:NSBackingStoreBuffered |
| 114 defer:YES]); | 114 defer:YES]); |
| 115 [window setReleasedWhenClosed:NO]; // Owned by scoped_nsobject. | 115 [window setReleasedWhenClosed:NO]; // Owned by scoped_nsobject. |
| 116 bridge_->Init(window, params); | 116 bridge_->Init(window, params); |
| 117 | 117 |
| 118 delegate_->OnNativeWidgetCreated(true); | 118 delegate_->OnNativeWidgetCreated(true); |
| 119 | 119 |
| 120 bridge_->SetFocusManager(GetWidget()->GetFocusManager()); | 120 bridge_->SetFocusManager(GetWidget()->GetFocusManager()); |
| 121 |
| 122 DCHECK(GetWidget()->GetRootView()); |
| 123 bridge_->SetRootView(GetWidget()->GetRootView()); |
| 121 } | 124 } |
| 122 | 125 |
| 123 NonClientFrameView* NativeWidgetMac::CreateNonClientFrameView() { | 126 NonClientFrameView* NativeWidgetMac::CreateNonClientFrameView() { |
| 124 return new NativeFrameView(GetWidget()); | 127 return new NativeFrameView(GetWidget()); |
| 125 } | 128 } |
| 126 | 129 |
| 127 bool NativeWidgetMac::ShouldUseNativeFrame() const { | 130 bool NativeWidgetMac::ShouldUseNativeFrame() const { |
| 128 return true; | 131 return true; |
| 129 } | 132 } |
| 130 | 133 |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 } | 599 } |
| 597 | 600 |
| 598 // static | 601 // static |
| 599 gfx::FontList NativeWidgetPrivate::GetWindowTitleFontList() { | 602 gfx::FontList NativeWidgetPrivate::GetWindowTitleFontList() { |
| 600 NOTIMPLEMENTED(); | 603 NOTIMPLEMENTED(); |
| 601 return gfx::FontList(); | 604 return gfx::FontList(); |
| 602 } | 605 } |
| 603 | 606 |
| 604 } // namespace internal | 607 } // namespace internal |
| 605 } // namespace views | 608 } // namespace views |
| OLD | NEW |