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 "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_embedder.h" | 8 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
9 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 9 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
10 #include "content/browser/frame_host/interstitial_page_impl.h" | 10 #include "content/browser/frame_host/interstitial_page_impl.h" |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 int item_height, | 247 int item_height, |
248 double item_font_size, | 248 double item_font_size, |
249 int selected_item, | 249 int selected_item, |
250 const std::vector<MenuItem>& items, | 250 const std::vector<MenuItem>& items, |
251 bool right_aligned, | 251 bool right_aligned, |
252 bool allow_multiple_selection) { | 252 bool allow_multiple_selection) { |
253 // External popup menus are only used on Mac and Android. | 253 // External popup menus are only used on Mac and Android. |
254 NOTIMPLEMENTED(); | 254 NOTIMPLEMENTED(); |
255 } | 255 } |
256 | 256 |
| 257 void WebContentsViewGuest::HidePopupMenu() { |
| 258 // External popup menus are only used on Mac and Android. |
| 259 NOTIMPLEMENTED(); |
| 260 } |
| 261 |
257 void WebContentsViewGuest::StartDragging( | 262 void WebContentsViewGuest::StartDragging( |
258 const DropData& drop_data, | 263 const DropData& drop_data, |
259 WebDragOperationsMask ops, | 264 WebDragOperationsMask ops, |
260 const gfx::ImageSkia& image, | 265 const gfx::ImageSkia& image, |
261 const gfx::Vector2d& image_offset, | 266 const gfx::Vector2d& image_offset, |
262 const DragEventSourceInfo& event_info) { | 267 const DragEventSourceInfo& event_info) { |
263 WebContentsImpl* embedder_web_contents = guest_->embedder_web_contents(); | 268 WebContentsImpl* embedder_web_contents = guest_->embedder_web_contents(); |
264 embedder_web_contents->GetBrowserPluginEmbedder()->StartDrag(guest_); | 269 embedder_web_contents->GetBrowserPluginEmbedder()->StartDrag(guest_); |
265 RenderViewHostImpl* embedder_render_view_host = | 270 RenderViewHostImpl* embedder_render_view_host = |
266 static_cast<RenderViewHostImpl*>( | 271 static_cast<RenderViewHostImpl*>( |
267 embedder_web_contents->GetRenderViewHost()); | 272 embedder_web_contents->GetRenderViewHost()); |
268 CHECK(embedder_render_view_host); | 273 CHECK(embedder_render_view_host); |
269 RenderViewHostDelegateView* view = | 274 RenderViewHostDelegateView* view = |
270 embedder_render_view_host->GetDelegate()->GetDelegateView(); | 275 embedder_render_view_host->GetDelegate()->GetDelegateView(); |
271 if (view) { | 276 if (view) { |
272 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.StartDrag")); | 277 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.StartDrag")); |
273 view->StartDragging(drop_data, ops, image, image_offset, event_info); | 278 view->StartDragging(drop_data, ops, image, image_offset, event_info); |
274 } else { | 279 } else { |
275 embedder_web_contents->SystemDragEnded(); | 280 embedder_web_contents->SystemDragEnded(); |
276 } | 281 } |
277 } | 282 } |
278 | 283 |
279 } // namespace content | 284 } // namespace content |
OLD | NEW |