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

Side by Side Diff: chrome/browser/tab_contents/web_drag_bookmark_handler_win.cc

Issue 9969208: TabContents -> WebContentsImpl, part 20. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_win.h" 5 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_win.h"
6 6
7 #include "chrome/browser/bookmarks/bookmark_node_data.h" 7 #include "chrome/browser/bookmarks/bookmark_node_data.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_window.h" 9 #include "chrome/browser/ui/browser_window.h"
10 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" 10 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
(...skipping 10 matching lines...) Expand all
21 WebDragBookmarkHandlerWin::WebDragBookmarkHandlerWin() 21 WebDragBookmarkHandlerWin::WebDragBookmarkHandlerWin()
22 : tab_(NULL) { 22 : tab_(NULL) {
23 } 23 }
24 24
25 WebDragBookmarkHandlerWin::~WebDragBookmarkHandlerWin() { 25 WebDragBookmarkHandlerWin::~WebDragBookmarkHandlerWin() {
26 } 26 }
27 27
28 void WebDragBookmarkHandlerWin::DragInitialize(WebContents* contents) { 28 void WebDragBookmarkHandlerWin::DragInitialize(WebContents* contents) {
29 // Ideally we would want to initialize the the TabContentsWrapper member in 29 // Ideally we would want to initialize the the TabContentsWrapper member in
30 // the constructor. We cannot do that as the WebDragTargetWin object is 30 // the constructor. We cannot do that as the WebDragTargetWin object is
31 // created during the construction of the TabContents object. The 31 // created during the construction of the WebContents object. The
32 // TabContentsWrapper is created much later. 32 // TabContentsWrapper is created much later.
33 DCHECK(tab_ ? (tab_->web_contents() == contents) : true); 33 DCHECK(tab_ ? (tab_->web_contents() == contents) : true);
34 if (!tab_) 34 if (!tab_)
35 tab_ = TabContentsWrapper::GetCurrentWrapperForContents(contents); 35 tab_ = TabContentsWrapper::GetCurrentWrapperForContents(contents);
36 } 36 }
37 37
38 void WebDragBookmarkHandlerWin::OnDragOver(IDataObject* data_object) { 38 void WebDragBookmarkHandlerWin::OnDragOver(IDataObject* data_object) {
39 if (tab_ && tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()) { 39 if (tab_ && tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()) {
40 ui::OSExchangeData os_exchange_data( 40 ui::OSExchangeData os_exchange_data(
41 new ui::OSExchangeDataProviderWin(data_object)); 41 new ui::OSExchangeDataProviderWin(data_object));
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 BookmarkNodeData bm_drag_data; 109 BookmarkNodeData bm_drag_data;
110 bm_drag_data.elements.push_back(bm_elt); 110 bm_drag_data.elements.push_back(bm_elt);
111 111
112 // Pass in NULL as the profile so that the bookmark always adds the url 112 // Pass in NULL as the profile so that the bookmark always adds the url
113 // rather than trying to move an existing url. 113 // rather than trying to move an existing url.
114 bm_drag_data.Write(NULL, data); 114 bm_drag_data.Write(NULL, data);
115 115
116 return true; 116 return true;
117 } 117 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc ('k') | chrome/browser/tabs/tab_strip_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698