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

Side by Side Diff: content/browser/web_contents/web_contents_view_guest.cc

Issue 12086095: Fixed drag and drop into and out of Browser Plugin. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Re-disabled when command line flag not present. Created 7 years, 10 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 unified diff | Download patch
OLDNEW
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 "content/browser/web_contents/web_contents_view_guest.h" 5 #include "content/browser/web_contents/web_contents_view_guest.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "content/browser/browser_plugin/browser_plugin_guest.h"
8 #include "content/browser/renderer_host/render_view_host_factory.h" 9 #include "content/browser/renderer_host/render_view_host_factory.h"
9 #include "content/browser/renderer_host/render_view_host_impl.h" 10 #include "content/browser/renderer_host/render_view_host_impl.h"
10 #include "content/browser/renderer_host/render_widget_host_view_guest.h" 11 #include "content/browser/renderer_host/render_widget_host_view_guest.h"
11 #include "content/browser/web_contents/interstitial_page_impl.h" 12 #include "content/browser/web_contents/interstitial_page_impl.h"
12 #include "content/browser/web_contents/web_contents_impl.h" 13 #include "content/browser/web_contents/web_contents_impl.h"
14 #include "content/common/drag_messages.h"
13 #include "content/public/browser/web_contents_delegate.h" 15 #include "content/public/browser/web_contents_delegate.h"
14 #include "ui/gfx/image/image_skia.h" 16 #include "ui/gfx/image/image_skia.h"
15 #include "ui/gfx/point.h" 17 #include "ui/gfx/point.h"
16 #include "ui/gfx/rect.h" 18 #include "ui/gfx/rect.h"
17 #include "ui/gfx/size.h" 19 #include "ui/gfx/size.h"
18 #include "webkit/glue/webdropdata.h" 20 #include "webkit/glue/webdropdata.h"
19 21
20 using WebKit::WebDragOperation; 22 using WebKit::WebDragOperation;
21 using WebKit::WebDragOperationsMask; 23 using WebKit::WebDragOperationsMask;
22 24
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 136
135 WebDropData* WebContentsViewGuest::GetDropData() const { 137 WebDropData* WebContentsViewGuest::GetDropData() const {
136 NOTIMPLEMENTED(); 138 NOTIMPLEMENTED();
137 return NULL; 139 return NULL;
138 } 140 }
139 141
140 void WebContentsViewGuest::CloseTabAfterEventTracking() { 142 void WebContentsViewGuest::CloseTabAfterEventTracking() {
141 } 143 }
142 144
143 void WebContentsViewGuest::UpdateDragCursor(WebDragOperation operation) { 145 void WebContentsViewGuest::UpdateDragCursor(WebDragOperation operation) {
144 NOTIMPLEMENTED(); 146 RenderViewHostImpl* embedder_render_view_host =
147 static_cast<RenderViewHostImpl*>(
148 guest_->embedder_web_contents()->GetRenderViewHost());
149 CHECK(embedder_render_view_host);
150 RenderViewHostDelegateView* view =
151 embedder_render_view_host->GetDelegate()->GetDelegateView();
152 if (view)
153 view->UpdateDragCursor(operation);
145 } 154 }
146 155
147 void WebContentsViewGuest::GotFocus() { 156 void WebContentsViewGuest::GotFocus() {
148 } 157 }
149 158
150 void WebContentsViewGuest::TakeFocus(bool reverse) { 159 void WebContentsViewGuest::TakeFocus(bool reverse) {
151 } 160 }
152 161
153 void WebContentsViewGuest::ShowContextMenu( 162 void WebContentsViewGuest::ShowContextMenu(
154 const ContextMenuParams& params, 163 const ContextMenuParams& params,
(...skipping 11 matching lines...) Expand all
166 // External popup menus are only used on Mac and Android. 175 // External popup menus are only used on Mac and Android.
167 NOTIMPLEMENTED(); 176 NOTIMPLEMENTED();
168 } 177 }
169 178
170 void WebContentsViewGuest::StartDragging( 179 void WebContentsViewGuest::StartDragging(
171 const WebDropData& drop_data, 180 const WebDropData& drop_data,
172 WebDragOperationsMask ops, 181 WebDragOperationsMask ops,
173 const gfx::ImageSkia& image, 182 const gfx::ImageSkia& image,
174 const gfx::Vector2d& image_offset, 183 const gfx::Vector2d& image_offset,
175 const DragEventSourceInfo& event_info) { 184 const DragEventSourceInfo& event_info) {
176 NOTIMPLEMENTED(); 185 RenderViewHostImpl* embedder_render_view_host =
186 static_cast<RenderViewHostImpl*>(
187 guest_->embedder_web_contents()->GetRenderViewHost());
188 CHECK(embedder_render_view_host);
189 RenderViewHostDelegateView* view =
190 embedder_render_view_host->GetDelegate()->GetDelegateView();
191 if (view)
192 view->StartDragging(drop_data, ops, image, image_offset, event_info);
177 } 193 }
178 194
179 } // namespace content 195 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698