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

Unified Diff: chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc

Issue 9757001: Support custom drag-and-drop of bookmarks in Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc
diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc
index adca553e812222c6f6e75d0da40838006b9b6299..a5f71221fc1e991ed2339c5ef97170ed8a70c56b 100644
--- a/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc
+++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.cc
@@ -6,6 +6,7 @@
#include "base/event_types.h"
#include "base/message_loop.h"
+#include "chrome/browser/tab_contents/web_drag_bookmark_handler_aura.h"
#include "chrome/browser/ui/sad_tab_helper.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_delegate.h"
@@ -179,6 +180,8 @@ void NativeTabContentsViewAura::InitNativeTabContentsView() {
// default if they are created with no parent. Pending oshima's
// change to reflect Widget types onto a ViewProp.
GetWidget()->Hide();
+
+ bookmark_handler_.reset(new WebDragBookmarkHandlerAura());
Ben Goodger (Google) 2012/03/20 17:25:54 hrm. tying the bookmark stuff into here is going t
varunjain 2012/03/20 18:19:16 On other platforms, bookmark handling is hooked to
}
RenderWidgetHostView* NativeTabContentsViewAura::CreateRenderWidgetHostView(
@@ -293,6 +296,8 @@ bool NativeTabContentsViewAura::OnMouseEvent(aura::MouseEvent* event) {
void NativeTabContentsViewAura::OnDragEntered(
const aura::DropTargetEvent& event) {
+ bookmark_handler_->DragInitialize(GetWebContents());
+
WebDropData drop_data;
PrepareWebDropData(&drop_data, event.data());
WebKit::WebDragOperationsMask op = ConvertToWeb(event.source_operations());
@@ -301,6 +306,8 @@ void NativeTabContentsViewAura::OnDragEntered(
GetNativeView()->GetRootWindow()->last_mouse_location();
GetWebContents()->GetRenderViewHost()->DragTargetDragEnter(
drop_data, event.location(), screen_pt, op);
+
+ bookmark_handler_->OnDragEnter(event.data());
}
int NativeTabContentsViewAura::OnDragUpdated(
@@ -310,11 +317,15 @@ int NativeTabContentsViewAura::OnDragUpdated(
GetNativeView()->GetRootWindow()->last_mouse_location();
GetWebContents()->GetRenderViewHost()->DragTargetDragOver(
event.location(), screen_pt, op);
+
+ bookmark_handler_->OnDragOver();
+
return ConvertFromWeb(current_drag_op_);
}
void NativeTabContentsViewAura::OnDragExited() {
GetWebContents()->GetRenderViewHost()->DragTargetDragLeave();
+ bookmark_handler_->OnDragLeave();
}
int NativeTabContentsViewAura::OnPerformDrop(
@@ -322,6 +333,7 @@ int NativeTabContentsViewAura::OnPerformDrop(
GetWebContents()->GetRenderViewHost()->DragTargetDrop(
event.location(),
GetNativeView()->GetRootWindow()->last_mouse_location());
+ bookmark_handler_->OnDrop();
return current_drag_op_;
}
« no previous file with comments | « chrome/browser/ui/views/tab_contents/native_tab_contents_view_aura.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698