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

Side by Side Diff: chrome/browser/ui/cocoa/tab_contents/web_drop_target.mm

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/cocoa/tab_contents/web_drop_target.h" 5 #import "chrome/browser/ui/cocoa/tab_contents/web_drop_target.h"
6 6
7 #include "base/sys_string_conversions.h" 7 #include "base/sys_string_conversions.h"
8 #include "chrome/browser/bookmarks/bookmark_node_data.h" 8 #include "chrome/browser/bookmarks/bookmark_node_data.h"
9 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" 9 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h"
10 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" 10 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 if (currentRVH_ != tabContents_->render_view_host()) 163 if (currentRVH_ != tabContents_->render_view_host())
164 [self draggingEntered:info view:view]; 164 [self draggingEntered:info view:view];
165 165
166 // Check if we only allow navigation and navigate to a url on the pasteboard. 166 // Check if we only allow navigation and navigate to a url on the pasteboard.
167 if ([self onlyAllowsNavigation]) { 167 if ([self onlyAllowsNavigation]) {
168 NSPasteboard* pboard = [info draggingPasteboard]; 168 NSPasteboard* pboard = [info draggingPasteboard];
169 if ([pboard containsURLData]) { 169 if ([pboard containsURLData]) {
170 GURL url; 170 GURL url;
171 drag_util::PopulateURLAndTitleFromPasteBoard(&url, NULL, pboard, YES); 171 drag_util::PopulateURLAndTitleFromPasteBoard(&url, NULL, pboard, YES);
172 tabContents_->OpenURL(url, GURL(), CURRENT_TAB, 172 tabContents_->OpenURL(url, GURL(), CURRENT_TAB,
173 PageTransition::AUTO_BOOKMARK); 173 content::PAGE_TRANSITION_AUTO_BOOKMARK);
174 return YES; 174 return YES;
175 } 175 }
176 return NO; 176 return NO;
177 } 177 }
178 178
179 // If the tab is showing the bookmark manager, send BookmarkDrag events 179 // If the tab is showing the bookmark manager, send BookmarkDrag events
180 BookmarkTabHelper::BookmarkDrag* dragDelegate = 180 BookmarkTabHelper::BookmarkDrag* dragDelegate =
181 tab_ ? tab_->bookmark_tab_helper()->GetBookmarkDragDelegate() : NULL; 181 tab_ ? tab_->bookmark_tab_helper()->GetBookmarkDragDelegate() : NULL;
182 BookmarkNodeData dragData; 182 BookmarkNodeData dragData;
183 if(dragDelegate && dragData.ReadFromDragClipboard()) 183 if(dragDelegate && dragData.ReadFromDragClipboard())
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 if (exists && !isDir) 245 if (exists && !isDir)
246 data->filenames.push_back(base::SysNSStringToUTF16(filename)); 246 data->filenames.push_back(base::SysNSStringToUTF16(filename));
247 } 247 }
248 } 248 }
249 } 249 }
250 250
251 // TODO(pinkerton): Get file contents. http://crbug.com/34661 251 // TODO(pinkerton): Get file contents. http://crbug.com/34661
252 } 252 }
253 253
254 @end 254 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/page_info_bubble_controller.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698