Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: chrome/browser/ui/views/frame/browser_frame_mac.mm

Issue 1146873002: [MacViews] Enable dragging a window by its caption/draggable areas. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "chrome/browser/ui/views/frame/browser_frame.h" 7 #include "chrome/browser/ui/views/frame/browser_frame.h"
8 #include "chrome/browser/ui/views/frame/browser_shutdown.h" 8 #include "chrome/browser/ui/views/frame/browser_shutdown.h"
9 #include "chrome/browser/ui/views/frame/browser_view.h" 9 #include "chrome/browser/ui/views/frame/browser_view.h"
10 #import "chrome/browser/ui/views/frame/native_widget_mac_frameless_nswindow.h" 10 #import "chrome/browser/ui/views/frame/native_widget_mac_frameless_nswindow.h"
(...skipping 29 matching lines...) Expand all
40 NSView* content_view = [GetNativeWindow() contentView]; 40 NSView* content_view = [GetNativeWindow() contentView];
41 NSView* root_view = [content_view superview]; 41 NSView* root_view = [content_view superview];
42 [content_view removeFromSuperview]; 42 [content_view removeFromSuperview];
43 [root_view setWantsLayer:YES]; 43 [root_view setWantsLayer:YES];
44 [root_view addSubview:content_view positioned:NSWindowBelow relativeTo:nil]; 44 [root_view addSubview:content_view positioned:NSWindowBelow relativeTo:nil];
45 } 45 }
46 46
47 gfx::NativeWindow BrowserFrameMac::CreateNSWindow( 47 gfx::NativeWindow BrowserFrameMac::CreateNSWindow(
48 const views::Widget::InitParams& params) { 48 const views::Widget::InitParams& params) {
49 NSUInteger style_mask = NSTitledWindowMask | NSClosableWindowMask | 49 NSUInteger style_mask = NSTitledWindowMask | NSClosableWindowMask |
50 NSMiniaturizableWindowMask | NSResizableWindowMask; 50 NSMiniaturizableWindowMask | NSResizableWindowMask |
51 NSTexturedBackgroundWindowMask;
51 return [[[NativeWidgetMacFramelessNSWindow alloc] 52 return [[[NativeWidgetMacFramelessNSWindow alloc]
52 initWithContentRect:ui::kWindowSizeDeterminedLater 53 initWithContentRect:ui::kWindowSizeDeterminedLater
53 styleMask:style_mask 54 styleMask:style_mask
54 backing:NSBackingStoreBuffered 55 backing:NSBackingStoreBuffered
55 defer:NO] autorelease]; 56 defer:NO] autorelease];
56 } 57 }
57 58
58 //////////////////////////////////////////////////////////////////////////////// 59 ////////////////////////////////////////////////////////////////////////////////
59 // BrowserFrameMac, NativeBrowserFrame implementation: 60 // BrowserFrameMac, NativeBrowserFrame implementation:
60 61
(...skipping 18 matching lines...) Expand all
79 void BrowserFrameMac::GetWindowPlacement( 80 void BrowserFrameMac::GetWindowPlacement(
80 gfx::Rect* bounds, 81 gfx::Rect* bounds,
81 ui::WindowShowState* show_state) const { 82 ui::WindowShowState* show_state) const {
82 return NativeWidgetMac::GetWindowPlacement(bounds, show_state); 83 return NativeWidgetMac::GetWindowPlacement(bounds, show_state);
83 } 84 }
84 85
85 int BrowserFrameMac::GetMinimizeButtonOffset() const { 86 int BrowserFrameMac::GetMinimizeButtonOffset() const {
86 NOTIMPLEMENTED(); 87 NOTIMPLEMENTED();
87 return 0; 88 return 0;
88 } 89 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698