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

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

Issue 10837192: Speculative revert to see if this change introduced a performance regression on Mac intl perf bots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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) 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_aura.h" 5 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_aura.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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void WebDragBookmarkHandlerAura::OnDrop() { 62 void WebDragBookmarkHandlerAura::OnDrop() {
63 if (tab_) { 63 if (tab_) {
64 if (tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()) { 64 if (tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()) {
65 if (bookmark_drag_data_.is_valid()) { 65 if (bookmark_drag_data_.is_valid()) {
66 tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()->OnDrop( 66 tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()->OnDrop(
67 bookmark_drag_data_); 67 bookmark_drag_data_);
68 } 68 }
69 } 69 }
70 70
71 // Focus the target browser. 71 // Focus the target browser.
72 Browser* browser = browser::FindBrowserWithWebContents( 72 Browser* browser = browser::FindBrowserForController(
73 tab_->web_contents()); 73 &tab_->web_contents()->GetController(), NULL);
74 if (browser) 74 if (browser)
75 browser->window()->Show(); 75 browser->window()->Show();
76 } 76 }
77 77
78 bookmark_drag_data_.Clear(); 78 bookmark_drag_data_.Clear();
79 } 79 }
80 80
81 void WebDragBookmarkHandlerAura::OnDragLeave() { 81 void WebDragBookmarkHandlerAura::OnDragLeave() {
82 if (tab_ && tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()) { 82 if (tab_ && tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()) {
83 if (bookmark_drag_data_.is_valid()) 83 if (bookmark_drag_data_.is_valid())
84 tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()->OnDragLeave( 84 tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()->OnDragLeave(
85 bookmark_drag_data_); 85 bookmark_drag_data_);
86 } 86 }
87 87
88 bookmark_drag_data_.Clear(); 88 bookmark_drag_data_.Clear();
89 } 89 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.cc ('k') | chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698