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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 view:(NSView*)view { 228 view:(NSView*)view {
229 if (currentRVH_ != webContents_->GetRenderViewHost()) 229 if (currentRVH_ != webContents_->GetRenderViewHost())
230 [self draggingEntered:info view:view]; 230 [self draggingEntered:info view:view];
231 231
232 // Check if we only allow navigation and navigate to a url on the pasteboard. 232 // Check if we only allow navigation and navigate to a url on the pasteboard.
233 if ([self onlyAllowsNavigation]) { 233 if ([self onlyAllowsNavigation]) {
234 NSPasteboard* pboard = [info draggingPasteboard]; 234 NSPasteboard* pboard = [info draggingPasteboard];
235 if ([pboard containsURLDataConvertingTextToURL:YES]) { 235 if ([pboard containsURLDataConvertingTextToURL:YES]) {
236 GURL url; 236 GURL url;
237 ui::PopulateURLAndTitleFromPasteboard(&url, NULL, pboard, YES); 237 ui::PopulateURLAndTitleFromPasteboard(&url, NULL, pboard, YES);
238 webContents_->OpenURL(OpenURLParams( 238 webContents_->OpenURL(
239 url, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_AUTO_BOOKMARK, 239 OpenURLParams(url, Referrer(), WindowOpenDisposition::CURRENT_TAB,
240 false)); 240 ui::PAGE_TRANSITION_AUTO_BOOKMARK, false));
241 return YES; 241 return YES;
242 } else { 242 } else {
243 return NO; 243 return NO;
244 } 244 }
245 } 245 }
246 246
247 if (delegate_) 247 if (delegate_)
248 delegate_->OnDrop(); 248 delegate_->OnDrop();
249 249
250 currentRVH_ = NULL; 250 currentRVH_ = NULL;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 // Get custom MIME data. 323 // Get custom MIME data.
324 if ([types containsObject:ui::kWebCustomDataPboardType]) { 324 if ([types containsObject:ui::kWebCustomDataPboardType]) {
325 NSData* customData = [pboard dataForType:ui::kWebCustomDataPboardType]; 325 NSData* customData = [pboard dataForType:ui::kWebCustomDataPboardType];
326 ui::ReadCustomDataIntoMap([customData bytes], 326 ui::ReadCustomDataIntoMap([customData bytes],
327 [customData length], 327 [customData length],
328 &data->custom_data); 328 &data->custom_data);
329 } 329 }
330 } 330 }
331 331
332 @end 332 @end
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl_browsertest.cc ('k') | content/browser/webui/generic_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698