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