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 #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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 - (void)copy:(id)sender; | 90 - (void)copy:(id)sender; |
91 - (void)paste:(id)sender; | 91 - (void)paste:(id)sender; |
92 - (void)selectAll:(id)sender; | 92 - (void)selectAll:(id)sender; |
93 | 93 |
94 @end | 94 @end |
95 | 95 |
96 @implementation BridgedContentView | 96 @implementation BridgedContentView |
97 | 97 |
98 @synthesize hostedView = hostedView_; | 98 @synthesize hostedView = hostedView_; |
99 @synthesize textInputClient = textInputClient_; | 99 @synthesize textInputClient = textInputClient_; |
| 100 @synthesize mouseDownCanMoveWindow = mouseDownCanMoveWindow_; |
100 | 101 |
101 - (id)initWithView:(views::View*)viewToHost { | 102 - (id)initWithView:(views::View*)viewToHost { |
102 DCHECK(viewToHost); | 103 DCHECK(viewToHost); |
103 gfx::Rect bounds = viewToHost->bounds(); | 104 gfx::Rect bounds = viewToHost->bounds(); |
104 // To keep things simple, assume the origin is (0, 0) until there exists a use | 105 // To keep things simple, assume the origin is (0, 0) until there exists a use |
105 // case for something other than that. | 106 // case for something other than that. |
106 DCHECK(bounds.origin().IsOrigin()); | 107 DCHECK(bounds.origin().IsOrigin()); |
107 NSRect initialFrame = NSMakeRect(0, 0, bounds.width(), bounds.height()); | 108 NSRect initialFrame = NSMakeRect(0, 0, bounds.width(), bounds.height()); |
108 if ((self = [super initWithFrame:initialFrame])) { | 109 if ((self = [super initWithFrame:initialFrame])) { |
109 hostedView_ = viewToHost; | 110 hostedView_ = viewToHost; |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 } | 722 } |
722 | 723 |
723 return [super accessibilityAttributeValue:attribute]; | 724 return [super accessibilityAttributeValue:attribute]; |
724 } | 725 } |
725 | 726 |
726 - (id)accessibilityHitTest:(NSPoint)point { | 727 - (id)accessibilityHitTest:(NSPoint)point { |
727 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point]; | 728 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point]; |
728 } | 729 } |
729 | 730 |
730 @end | 731 @end |
OLD | NEW |