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

Side by Side Diff: ui/views/cocoa/drag_drop_client_mac.mm

Issue 2039723002: Add missing curlies in CocoaDragDropDataProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: indenty Created 4 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/drag_drop_client_mac.h" 5 #import "ui/views/cocoa/drag_drop_client_mac.h"
6 6
7 #include "base/mac/mac_util.h" 7 #include "base/mac/mac_util.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #import "ui/base/dragdrop/os_exchange_data_provider_mac.h" 10 #import "ui/base/dragdrop/os_exchange_data_provider_mac.h"
11 #include "ui/gfx/image/image_skia_util_mac.h" 11 #include "ui/gfx/image/image_skia_util_mac.h"
12 #include "ui/views/drag_utils.h" 12 #include "ui/views/drag_utils.h"
13 #import "ui/views/cocoa/bridged_content_view.h" 13 #import "ui/views/cocoa/bridged_content_view.h"
14 #import "ui/views/cocoa/bridged_native_widget.h" 14 #import "ui/views/cocoa/bridged_native_widget.h"
15 #include "ui/views/widget/native_widget_mac.h" 15 #include "ui/views/widget/native_widget_mac.h"
16 16
17 @interface CocoaDragDropDataProvider () 17 @interface CocoaDragDropDataProvider ()
18 - (id)initWithData:(const ui::OSExchangeData&)data; 18 - (id)initWithData:(const ui::OSExchangeData&)data;
19 - (id)initWithPasteboard:(NSPasteboard*)pasteboard; 19 - (id)initWithPasteboard:(NSPasteboard*)pasteboard;
20 @end 20 @end
21 21
22 @implementation CocoaDragDropDataProvider 22 @implementation CocoaDragDropDataProvider {
23 23 std::unique_ptr<ui::OSExchangeData> data_;
24 std::unique_ptr<ui::OSExchangeData> data_; 24 }
25 25
26 - (id)initWithData:(const ui::OSExchangeData&)data { 26 - (id)initWithData:(const ui::OSExchangeData&)data {
27 if ((self = [super init])) { 27 if ((self = [super init])) {
28 data_.reset(new OSExchangeData(data.provider().Clone())); 28 data_.reset(new OSExchangeData(data.provider().Clone()));
29 } 29 }
30 return self; 30 return self;
31 } 31 }
32 32
33 - (id)initWithPasteboard:(NSPasteboard*)pasteboard { 33 - (id)initWithPasteboard:(NSPasteboard*)pasteboard {
34 if ((self = [super init])) { 34 if ((self = [super init])) {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 quit_closure_.Run(); 154 quit_closure_.Run();
155 quit_closure_.Reset(); 155 quit_closure_.Reset();
156 } 156 }
157 } 157 }
158 158
159 gfx::Point DragDropClientMac::LocationInView(NSPoint point) const { 159 gfx::Point DragDropClientMac::LocationInView(NSPoint point) const {
160 return gfx::Point(point.x, NSHeight([bridge_->ns_window() frame]) - point.y); 160 return gfx::Point(point.x, NSHeight([bridge_->ns_window() frame]) - point.y);
161 } 161 }
162 162
163 } // namespace views 163 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698