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

Side by Side Diff: content/browser/web_contents/web_drag_dest_mac.mm

Issue 63253002: Rename WebKit namespace to blink (part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/web_contents/web_drag_dest_mac.h" 5 #import "content/browser/web_contents/web_drag_dest_mac.h"
6 6
7 #import <Carbon/Carbon.h> 7 #import <Carbon/Carbon.h>
8 8
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "content/browser/renderer_host/render_view_host_impl.h" 10 #include "content/browser/renderer_host/render_view_host_impl.h"
11 #include "content/browser/web_contents/web_contents_impl.h" 11 #include "content/browser/web_contents/web_contents_impl.h"
12 #include "content/public/browser/web_contents_delegate.h" 12 #include "content/public/browser/web_contents_delegate.h"
13 #include "content/public/browser/web_drag_dest_delegate.h" 13 #include "content/public/browser/web_drag_dest_delegate.h"
14 #include "content/public/common/drop_data.h" 14 #include "content/public/common/drop_data.h"
15 #import "third_party/mozilla/NSPasteboard+Utils.h" 15 #import "third_party/mozilla/NSPasteboard+Utils.h"
16 #include "third_party/WebKit/public/web/WebInputEvent.h" 16 #include "third_party/WebKit/public/web/WebInputEvent.h"
17 #include "ui/base/clipboard/custom_data_helper.h" 17 #include "ui/base/clipboard/custom_data_helper.h"
18 #import "ui/base/dragdrop/cocoa_dnd_util.h" 18 #import "ui/base/dragdrop/cocoa_dnd_util.h"
19 #include "ui/base/window_open_disposition.h" 19 #include "ui/base/window_open_disposition.h"
20 20
21 using WebKit::WebDragOperationsMask; 21 using blink::WebDragOperationsMask;
22 using content::DropData; 22 using content::DropData;
23 using content::OpenURLParams; 23 using content::OpenURLParams;
24 using content::Referrer; 24 using content::Referrer;
25 using content::WebContentsImpl; 25 using content::WebContentsImpl;
26 26
27 int GetModifierFlags() { 27 int GetModifierFlags() {
28 int modifier_state = 0; 28 int modifier_state = 0;
29 UInt32 currentModifiers = GetCurrentKeyModifiers(); 29 UInt32 currentModifiers = GetCurrentKeyModifiers();
30 if (currentModifiers & ::shiftKey) 30 if (currentModifiers & ::shiftKey)
31 modifier_state |= WebKit::WebInputEvent::ShiftKey; 31 modifier_state |= blink::WebInputEvent::ShiftKey;
32 if (currentModifiers & ::controlKey) 32 if (currentModifiers & ::controlKey)
33 modifier_state |= WebKit::WebInputEvent::ControlKey; 33 modifier_state |= blink::WebInputEvent::ControlKey;
34 if (currentModifiers & ::optionKey) 34 if (currentModifiers & ::optionKey)
35 modifier_state |= WebKit::WebInputEvent::AltKey; 35 modifier_state |= blink::WebInputEvent::AltKey;
36 if (currentModifiers & ::cmdKey) 36 if (currentModifiers & ::cmdKey)
37 modifier_state |= WebKit::WebInputEvent::MetaKey; 37 modifier_state |= blink::WebInputEvent::MetaKey;
38 return modifier_state; 38 return modifier_state;
39 } 39 }
40 40
41 @implementation WebDragDest 41 @implementation WebDragDest
42 42
43 // |contents| is the WebContentsImpl representing this tab, used to communicate 43 // |contents| is the WebContentsImpl representing this tab, used to communicate
44 // drag&drop messages to WebCore and handle navigation on a successful drop 44 // drag&drop messages to WebCore and handle navigation on a successful drop
45 // (if necessary). 45 // (if necessary).
46 - (id)initWithWebContentsImpl:(WebContentsImpl*)contents { 46 - (id)initWithWebContentsImpl:(WebContentsImpl*)contents {
47 if ((self = [super init])) { 47 if ((self = [super init])) {
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 // Get custom MIME data. 301 // Get custom MIME data.
302 if ([types containsObject:ui::kWebCustomDataPboardType]) { 302 if ([types containsObject:ui::kWebCustomDataPboardType]) {
303 NSData* customData = [pboard dataForType:ui::kWebCustomDataPboardType]; 303 NSData* customData = [pboard dataForType:ui::kWebCustomDataPboardType];
304 ui::ReadCustomDataIntoMap([customData bytes], 304 ui::ReadCustomDataIntoMap([customData bytes],
305 [customData length], 305 [customData length],
306 &data->custom_data); 306 &data->custom_data);
307 } 307 }
308 } 308 }
309 309
310 @end 310 @end
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_drag_dest_gtk.cc ('k') | content/browser/web_contents/web_drag_dest_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698