| 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_mac.h" | 5 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_mac.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/bookmarks/bookmark_tab_helper.h" | 10 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 void WebDragBookmarkHandlerMac::OnDrop() { | 44 void WebDragBookmarkHandlerMac::OnDrop() { |
| 45 // This is non-null if the web_contents_ is showing an ExtensionWebUI with | 45 // This is non-null if the web_contents_ is showing an ExtensionWebUI with |
| 46 // support for (at the moment experimental) drag and drop extensions. | 46 // support for (at the moment experimental) drag and drop extensions. |
| 47 if (bookmark_tab_helper_) { | 47 if (bookmark_tab_helper_) { |
| 48 if (bookmark_tab_helper_->GetBookmarkDragDelegate()) { | 48 if (bookmark_tab_helper_->GetBookmarkDragDelegate()) { |
| 49 bookmark_tab_helper_->GetBookmarkDragDelegate()->OnDrop( | 49 bookmark_tab_helper_->GetBookmarkDragDelegate()->OnDrop( |
| 50 bookmark_drag_data_); | 50 bookmark_drag_data_); |
| 51 } | 51 } |
| 52 | 52 |
| 53 // Focus the target browser. | 53 // Focus the target browser. |
| 54 Browser* browser = browser::FindBrowserWithWebContents(web_contents_); | 54 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_); |
| 55 if (browser) | 55 if (browser) |
| 56 browser->window()->Show(); | 56 browser->window()->Show(); |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 | 59 |
| 60 void WebDragBookmarkHandlerMac::OnDragLeave() { | 60 void WebDragBookmarkHandlerMac::OnDragLeave() { |
| 61 if (bookmark_tab_helper_ && bookmark_tab_helper_->GetBookmarkDragDelegate()) { | 61 if (bookmark_tab_helper_ && bookmark_tab_helper_->GetBookmarkDragDelegate()) { |
| 62 bookmark_tab_helper_->GetBookmarkDragDelegate()->OnDragLeave( | 62 bookmark_tab_helper_->GetBookmarkDragDelegate()->OnDragLeave( |
| 63 bookmark_drag_data_); | 63 bookmark_drag_data_); |
| 64 } | 64 } |
| 65 } | 65 } |
| OLD | NEW |