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

Side by Side Diff: ui/views/cocoa/bridged_content_view.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
« no previous file with comments | « ui/views/cocoa/bridged_content_view.h ('k') | ui/views/cocoa/bridged_native_widget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #import "ui/views/cocoa/bridged_content_view.h" 5 #import "ui/views/cocoa/bridged_content_view.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/mac/scoped_nsobject.h" 8 #import "base/mac/scoped_nsobject.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "ui/base/ime/text_input_client.h" 10 #include "ui/base/ime/text_input_client.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 - (void)copy:(id)sender; 86 - (void)copy:(id)sender;
87 - (void)paste:(id)sender; 87 - (void)paste:(id)sender;
88 - (void)selectAll:(id)sender; 88 - (void)selectAll:(id)sender;
89 89
90 @end 90 @end
91 91
92 @implementation BridgedContentView 92 @implementation BridgedContentView
93 93
94 @synthesize hostedView = hostedView_; 94 @synthesize hostedView = hostedView_;
95 @synthesize textInputClient = textInputClient_; 95 @synthesize textInputClient = textInputClient_;
96 @synthesize mouseDownCanMoveWindow = mouseDownCanMoveWindow_;
96 97
97 - (id)initWithView:(views::View*)viewToHost { 98 - (id)initWithView:(views::View*)viewToHost {
98 DCHECK(viewToHost); 99 DCHECK(viewToHost);
99 gfx::Rect bounds = viewToHost->bounds(); 100 gfx::Rect bounds = viewToHost->bounds();
100 // To keep things simple, assume the origin is (0, 0) until there exists a use 101 // To keep things simple, assume the origin is (0, 0) until there exists a use
101 // case for something other than that. 102 // case for something other than that.
102 DCHECK(bounds.origin().IsOrigin()); 103 DCHECK(bounds.origin().IsOrigin());
103 NSRect initialFrame = NSMakeRect(0, 0, bounds.width(), bounds.height()); 104 NSRect initialFrame = NSMakeRect(0, 0, bounds.width(), bounds.height());
104 if ((self = [super initWithFrame:initialFrame])) { 105 if ((self = [super initWithFrame:initialFrame])) {
105 hostedView_ = viewToHost; 106 hostedView_ = viewToHost;
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 } 706 }
706 707
707 return [super accessibilityAttributeValue:attribute]; 708 return [super accessibilityAttributeValue:attribute];
708 } 709 }
709 710
710 - (id)accessibilityHitTest:(NSPoint)point { 711 - (id)accessibilityHitTest:(NSPoint)point {
711 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point]; 712 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point];
712 } 713 }
713 714
714 @end 715 @end
OLDNEW
« no previous file with comments | « ui/views/cocoa/bridged_content_view.h ('k') | ui/views/cocoa/bridged_native_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698