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

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

Issue 8892011: Clean up TCW, make it solely a hub for 1:1 observer/helper objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_window.h" 8 #include "chrome/browser/ui/browser_window.h"
9 #include "chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.h" 9 #include "chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.h"
10 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" 10 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
11 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 11 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "content/browser/tab_contents/tab_contents.h"
13 #include "ui/base/dragdrop/gtk_dnd_util.h" 14 #include "ui/base/dragdrop/gtk_dnd_util.h"
14 15
15 WebDragBookmarkHandlerGtk::WebDragBookmarkHandlerGtk() 16 WebDragBookmarkHandlerGtk::WebDragBookmarkHandlerGtk()
16 : tab_(NULL) { 17 : tab_(NULL) {
17 } 18 }
18 19
19 WebDragBookmarkHandlerGtk::~WebDragBookmarkHandlerGtk() {} 20 WebDragBookmarkHandlerGtk::~WebDragBookmarkHandlerGtk() {}
20 21
21 void WebDragBookmarkHandlerGtk::DragInitialize(TabContents* contents) { 22 void WebDragBookmarkHandlerGtk::DragInitialize(TabContents* contents) {
22 bookmark_drag_data_.Clear(); 23 bookmark_drag_data_.Clear();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // This is non-null if tab_contents_ is showing an ExtensionWebUI with 75 // This is non-null if tab_contents_ is showing an ExtensionWebUI with
75 // support for (at the moment experimental) drag and drop extensions. 76 // support for (at the moment experimental) drag and drop extensions.
76 if (tab_) { 77 if (tab_) {
77 if (tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()) { 78 if (tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()) {
78 tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()->OnDrop( 79 tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()->OnDrop(
79 bookmark_drag_data_); 80 bookmark_drag_data_);
80 } 81 }
81 82
82 // Focus the target browser. 83 // Focus the target browser.
83 Browser* browser = Browser::GetBrowserForController( 84 Browser* browser = Browser::GetBrowserForController(
84 &tab_->controller(), NULL); 85 &tab_->tab_contents()->controller(), NULL);
85 if (browser) 86 if (browser)
86 browser->window()->Show(); 87 browser->window()->Show();
87 } 88 }
88 } 89 }
89 90
90 void WebDragBookmarkHandlerGtk::OnDragLeave() { 91 void WebDragBookmarkHandlerGtk::OnDragLeave() {
91 if (tab_ && tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()) { 92 if (tab_ && tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()) {
92 tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()->OnDragLeave( 93 tab_->bookmark_tab_helper()->GetBookmarkDragDelegate()->OnDragLeave(
93 bookmark_drag_data_); 94 bookmark_drag_data_);
94 } 95 }
95 } 96 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_ssl_helper.cc ('k') | chrome/browser/tab_contents/web_drag_bookmark_handler_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698