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_; |
} |