Chromium Code Reviews| 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 "chrome/browser/ui/views/frame/browser_frame_mac.h" | 5 #include "chrome/browser/ui/views/frame/browser_frame_mac.h" |
| 6 | 6 |
| 7 #import "chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.h" | 7 #import "chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.h" |
| 8 #include "chrome/browser/ui/views/frame/browser_frame.h" | 8 #include "chrome/browser/ui/views/frame/browser_frame.h" |
| 9 #include "chrome/browser/ui/views/frame/browser_shutdown.h" | 9 #include "chrome/browser/ui/views/frame/browser_shutdown.h" |
| 10 #include "chrome/browser/ui/views/frame/browser_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_view.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 NSUInteger style_mask = NSTitledWindowMask | NSClosableWindowMask | | 63 NSUInteger style_mask = NSTitledWindowMask | NSClosableWindowMask | |
| 64 NSMiniaturizableWindowMask | NSResizableWindowMask | | 64 NSMiniaturizableWindowMask | NSResizableWindowMask | |
| 65 NSTexturedBackgroundWindowMask; | 65 NSTexturedBackgroundWindowMask; |
| 66 base::scoped_nsobject<NativeWidgetMacFramelessNSWindow> ns_window( | 66 base::scoped_nsobject<NativeWidgetMacFramelessNSWindow> ns_window( |
| 67 [[NativeWidgetMacFramelessNSWindow alloc] | 67 [[NativeWidgetMacFramelessNSWindow alloc] |
| 68 initWithContentRect:ui::kWindowSizeDeterminedLater | 68 initWithContentRect:ui::kWindowSizeDeterminedLater |
| 69 styleMask:style_mask | 69 styleMask:style_mask |
| 70 backing:NSBackingStoreBuffered | 70 backing:NSBackingStoreBuffered |
| 71 defer:NO]); | 71 defer:NO]); |
| 72 [ns_window setCommandDispatcherDelegate:command_dispatcher_delegate_]; | 72 [ns_window setCommandDispatcherDelegate:command_dispatcher_delegate_]; |
| 73 [ns_window setUserInterfaceItemCommandHandler:command_dispatcher_delegate_]; | |
|
tapted
2015/09/03 04:15:38
can NativeWidgetMacNSWindow assume these are alway
jackhou1
2015/09/03 06:15:39
Done.
| |
| 73 return ns_window.autorelease(); | 74 return ns_window.autorelease(); |
| 74 } | 75 } |
| 75 | 76 |
| 76 //////////////////////////////////////////////////////////////////////////////// | 77 //////////////////////////////////////////////////////////////////////////////// |
| 77 // BrowserFrameMac, NativeBrowserFrame implementation: | 78 // BrowserFrameMac, NativeBrowserFrame implementation: |
| 78 | 79 |
| 79 views::Widget::InitParams BrowserFrameMac::GetWidgetParams() { | 80 views::Widget::InitParams BrowserFrameMac::GetWidgetParams() { |
| 80 views::Widget::InitParams params; | 81 views::Widget::InitParams params; |
| 81 params.native_widget = this; | 82 params.native_widget = this; |
| 82 return params; | 83 return params; |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 97 void BrowserFrameMac::GetWindowPlacement( | 98 void BrowserFrameMac::GetWindowPlacement( |
| 98 gfx::Rect* bounds, | 99 gfx::Rect* bounds, |
| 99 ui::WindowShowState* show_state) const { | 100 ui::WindowShowState* show_state) const { |
| 100 return NativeWidgetMac::GetWindowPlacement(bounds, show_state); | 101 return NativeWidgetMac::GetWindowPlacement(bounds, show_state); |
| 101 } | 102 } |
| 102 | 103 |
| 103 int BrowserFrameMac::GetMinimizeButtonOffset() const { | 104 int BrowserFrameMac::GetMinimizeButtonOffset() const { |
| 104 NOTIMPLEMENTED(); | 105 NOTIMPLEMENTED(); |
| 105 return 0; | 106 return 0; |
| 106 } | 107 } |
| OLD | NEW |