| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 NSMiniaturizableWindowMask | NSResizableWindowMask; | 56 NSMiniaturizableWindowMask | NSResizableWindowMask; |
| 57 base::scoped_nsobject<NSWindow> window( | 57 base::scoped_nsobject<NSWindow> window( |
| 58 [[NSWindow alloc] initWithContentRect:content_rect | 58 [[NSWindow alloc] initWithContentRect:content_rect |
| 59 styleMask:style_mask | 59 styleMask:style_mask |
| 60 backing:NSBackingStoreBuffered | 60 backing:NSBackingStoreBuffered |
| 61 defer:NO]); | 61 defer:NO]); |
| 62 [window setReleasedWhenClosed:NO]; // Owned by scoped_nsobject. | 62 [window setReleasedWhenClosed:NO]; // Owned by scoped_nsobject. |
| 63 bridge_->Init(window, params); | 63 bridge_->Init(window, params); |
| 64 | 64 |
| 65 delegate_->OnNativeWidgetCreated(true); | 65 delegate_->OnNativeWidgetCreated(true); |
| 66 |
| 67 bridge_->SetFocusManager(GetWidget()->GetFocusManager()); |
| 66 } | 68 } |
| 67 | 69 |
| 68 NonClientFrameView* NativeWidgetMac::CreateNonClientFrameView() { | 70 NonClientFrameView* NativeWidgetMac::CreateNonClientFrameView() { |
| 69 return NULL; | 71 return NULL; |
| 70 } | 72 } |
| 71 | 73 |
| 72 bool NativeWidgetMac::ShouldUseNativeFrame() const { | 74 bool NativeWidgetMac::ShouldUseNativeFrame() const { |
| 73 return false; | 75 return false; |
| 74 } | 76 } |
| 75 | 77 |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 } | 489 } |
| 488 | 490 |
| 489 // static | 491 // static |
| 490 gfx::FontList NativeWidgetPrivate::GetWindowTitleFontList() { | 492 gfx::FontList NativeWidgetPrivate::GetWindowTitleFontList() { |
| 491 NOTIMPLEMENTED(); | 493 NOTIMPLEMENTED(); |
| 492 return gfx::FontList(); | 494 return gfx::FontList(); |
| 493 } | 495 } |
| 494 | 496 |
| 495 } // namespace internal | 497 } // namespace internal |
| 496 } // namespace views | 498 } // namespace views |
| OLD | NEW |