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

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

Issue 11434074: browser: Move FindBrowserWithWebContents() into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 #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_finder.h" 9 #include "chrome/browser/ui/browser_finder.h"
10 #include "chrome/browser/ui/browser_window.h" 10 #include "chrome/browser/ui/browser_window.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 ui::OSExchangeData os_exchange_data( 68 ui::OSExchangeData os_exchange_data(
69 new ui::OSExchangeDataProviderWin(data_object)); 69 new ui::OSExchangeDataProviderWin(data_object));
70 BookmarkNodeData bookmark_drag_data; 70 BookmarkNodeData bookmark_drag_data;
71 if (bookmark_drag_data.Read(os_exchange_data)) { 71 if (bookmark_drag_data.Read(os_exchange_data)) {
72 bookmark_tab_helper_->GetBookmarkDragDelegate()->OnDrop( 72 bookmark_tab_helper_->GetBookmarkDragDelegate()->OnDrop(
73 bookmark_drag_data); 73 bookmark_drag_data);
74 } 74 }
75 } 75 }
76 76
77 // Focus the target browser. 77 // Focus the target browser.
78 Browser* browser = browser::FindBrowserWithWebContents(web_contents_); 78 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_);
79 if (browser) 79 if (browser)
80 browser->window()->Show(); 80 browser->window()->Show();
81 } 81 }
82 } 82 }
83 83
84 void WebDragBookmarkHandlerWin::OnDragLeave(IDataObject* data_object) { 84 void WebDragBookmarkHandlerWin::OnDragLeave(IDataObject* data_object) {
85 if (bookmark_tab_helper_ && bookmark_tab_helper_->GetBookmarkDragDelegate()) { 85 if (bookmark_tab_helper_ && bookmark_tab_helper_->GetBookmarkDragDelegate()) {
86 ui::OSExchangeData os_exchange_data( 86 ui::OSExchangeData os_exchange_data(
87 new ui::OSExchangeDataProviderWin(data_object)); 87 new ui::OSExchangeDataProviderWin(data_object));
88 BookmarkNodeData bookmark_drag_data; 88 BookmarkNodeData bookmark_drag_data;
(...skipping 19 matching lines...) Expand all
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_mac.mm ('k') | chrome/browser/translate/translate_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698