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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 (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"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 if (currentRVH_ != webContents_->GetRenderViewHost()) 209 if (currentRVH_ != webContents_->GetRenderViewHost())
210 [self draggingEntered:info view:view]; 210 [self draggingEntered:info view:view];
211 211
212 // Check if we only allow navigation and navigate to a url on the pasteboard. 212 // Check if we only allow navigation and navigate to a url on the pasteboard.
213 if ([self onlyAllowsNavigation]) { 213 if ([self onlyAllowsNavigation]) {
214 NSPasteboard* pboard = [info draggingPasteboard]; 214 NSPasteboard* pboard = [info draggingPasteboard];
215 if ([pboard containsURLData]) { 215 if ([pboard containsURLData]) {
216 GURL url; 216 GURL url;
217 ui::PopulateURLAndTitleFromPasteboard(&url, NULL, pboard, YES); 217 ui::PopulateURLAndTitleFromPasteboard(&url, NULL, pboard, YES);
218 webContents_->OpenURL(OpenURLParams( 218 webContents_->OpenURL(OpenURLParams(
219 url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_AUTO_BOOKMARK, 219 url, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_AUTO_BOOKMARK,
220 false)); 220 false));
221 return YES; 221 return YES;
222 } else { 222 } else {
223 return NO; 223 return NO;
224 } 224 }
225 } 225 }
226 226
227 if (delegate_) 227 if (delegate_)
228 delegate_->OnDrop(); 228 delegate_->OnDrop();
229 229
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 // Get custom MIME data. 304 // Get custom MIME data.
305 if ([types containsObject:ui::kWebCustomDataPboardType]) { 305 if ([types containsObject:ui::kWebCustomDataPboardType]) {
306 NSData* customData = [pboard dataForType:ui::kWebCustomDataPboardType]; 306 NSData* customData = [pboard dataForType:ui::kWebCustomDataPboardType];
307 ui::ReadCustomDataIntoMap([customData bytes], 307 ui::ReadCustomDataIntoMap([customData bytes],
308 [customData length], 308 [customData length],
309 &data->custom_data); 309 &data->custom_data);
310 } 310 }
311 } 311 }
312 312
313 @end 313 @end
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura_browsertest.cc ('k') | content/browser/webui/generic_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698