OLD | NEW |
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 Loading... |
62 void WebDragBookmarkHandlerAura::OnDrop() { | 62 void WebDragBookmarkHandlerAura::OnDrop() { |
63 if (bookmark_tab_helper_) { | 63 if (bookmark_tab_helper_) { |
64 if (bookmark_tab_helper_->GetBookmarkDragDelegate()) { | 64 if (bookmark_tab_helper_->GetBookmarkDragDelegate()) { |
65 if (bookmark_drag_data_.is_valid()) { | 65 if (bookmark_drag_data_.is_valid()) { |
66 bookmark_tab_helper_->GetBookmarkDragDelegate()->OnDrop( | 66 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(web_contents_); | 72 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_); |
73 if (browser) | 73 if (browser) |
74 browser->window()->Show(); | 74 browser->window()->Show(); |
75 } | 75 } |
76 | 76 |
77 bookmark_drag_data_.Clear(); | 77 bookmark_drag_data_.Clear(); |
78 } | 78 } |
79 | 79 |
80 void WebDragBookmarkHandlerAura::OnDragLeave() { | 80 void WebDragBookmarkHandlerAura::OnDragLeave() { |
81 if (bookmark_tab_helper_ && bookmark_tab_helper_->GetBookmarkDragDelegate()) { | 81 if (bookmark_tab_helper_ && bookmark_tab_helper_->GetBookmarkDragDelegate()) { |
82 if (bookmark_drag_data_.is_valid()) | 82 if (bookmark_drag_data_.is_valid()) |
83 bookmark_tab_helper_->GetBookmarkDragDelegate()->OnDragLeave( | 83 bookmark_tab_helper_->GetBookmarkDragDelegate()->OnDragLeave( |
84 bookmark_drag_data_); | 84 bookmark_drag_data_); |
85 } | 85 } |
86 | 86 |
87 bookmark_drag_data_.Clear(); | 87 bookmark_drag_data_.Clear(); |
88 } | 88 } |
OLD | NEW |