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_gtk.h" | 5 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.h" |
6 | 6 |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/browser_finder.h" | 8 #include "chrome/browser/ui/browser_finder.h" |
9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
10 #include "chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.h" | 10 #include "chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 void WebDragBookmarkHandlerGtk::OnDrop() { | 76 void WebDragBookmarkHandlerGtk::OnDrop() { |
77 // This is non-null if tab_contents_ is showing an ExtensionWebUI with | 77 // This is non-null if tab_contents_ is showing an ExtensionWebUI with |
78 // support for (at the moment experimental) drag and drop extensions. | 78 // support for (at the moment experimental) drag and drop extensions. |
79 if (bookmark_tab_helper_) { | 79 if (bookmark_tab_helper_) { |
80 if (bookmark_tab_helper_->GetBookmarkDragDelegate()) { | 80 if (bookmark_tab_helper_->GetBookmarkDragDelegate()) { |
81 bookmark_tab_helper_->GetBookmarkDragDelegate()->OnDrop( | 81 bookmark_tab_helper_->GetBookmarkDragDelegate()->OnDrop( |
82 bookmark_drag_data_); | 82 bookmark_drag_data_); |
83 } | 83 } |
84 | 84 |
85 // Focus the target browser. | 85 // Focus the target browser. |
86 Browser* browser = browser::FindBrowserWithWebContents(web_contents_); | 86 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_); |
87 if (browser) | 87 if (browser) |
88 browser->window()->Show(); | 88 browser->window()->Show(); |
89 } | 89 } |
90 } | 90 } |
91 | 91 |
92 void WebDragBookmarkHandlerGtk::OnDragLeave() { | 92 void WebDragBookmarkHandlerGtk::OnDragLeave() { |
93 if (bookmark_tab_helper_ && bookmark_tab_helper_->GetBookmarkDragDelegate()) { | 93 if (bookmark_tab_helper_ && bookmark_tab_helper_->GetBookmarkDragDelegate()) { |
94 bookmark_tab_helper_->GetBookmarkDragDelegate()->OnDragLeave( | 94 bookmark_tab_helper_->GetBookmarkDragDelegate()->OnDragLeave( |
95 bookmark_drag_data_); | 95 bookmark_drag_data_); |
96 } | 96 } |
97 } | 97 } |
OLD | NEW |