| 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_aura.h" | 5 #include "content/browser/web_contents/web_contents_view_aura.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "content/browser/renderer_host/dip_util.h" | 8 #include "content/browser/renderer_host/dip_util.h" |
| 9 #include "content/browser/renderer_host/render_view_host_factory.h" | 9 #include "content/browser/renderer_host/render_view_host_factory.h" |
| 10 #include "content/browser/web_contents/interstitial_page_impl.h" | 10 #include "content/browser/web_contents/interstitial_page_impl.h" |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 | 399 |
| 400 gfx::Rect WebContentsViewAura::GetViewBounds() const { | 400 gfx::Rect WebContentsViewAura::GetViewBounds() const { |
| 401 return window_->GetBoundsInRootWindow(); | 401 return window_->GetBoundsInRootWindow(); |
| 402 } | 402 } |
| 403 | 403 |
| 404 //////////////////////////////////////////////////////////////////////////////// | 404 //////////////////////////////////////////////////////////////////////////////// |
| 405 // WebContentsViewAura, RenderViewHostDelegateView implementation: | 405 // WebContentsViewAura, RenderViewHostDelegateView implementation: |
| 406 | 406 |
| 407 void WebContentsViewAura::ShowContextMenu( | 407 void WebContentsViewAura::ShowContextMenu( |
| 408 const content::ContextMenuParams& params, | 408 const content::ContextMenuParams& params, |
| 409 const content::ContextMenuSourceType& type) { | 409 content::ContextMenuSourceType type) { |
| 410 if (delegate_.get()) | 410 if (delegate_.get()) |
| 411 delegate_->ShowContextMenu(params, type); | 411 delegate_->ShowContextMenu(params, type); |
| 412 } | 412 } |
| 413 | 413 |
| 414 void WebContentsViewAura::ShowPopupMenu(const gfx::Rect& bounds, | 414 void WebContentsViewAura::ShowPopupMenu(const gfx::Rect& bounds, |
| 415 int item_height, | 415 int item_height, |
| 416 double item_font_size, | 416 double item_font_size, |
| 417 int selected_item, | 417 int selected_item, |
| 418 const std::vector<WebMenuItem>& items, | 418 const std::vector<WebMenuItem>& items, |
| 419 bool right_aligned, | 419 bool right_aligned, |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 OnDragEntered(event); | 644 OnDragEntered(event); |
| 645 | 645 |
| 646 web_contents_->GetRenderViewHost()->DragTargetDrop( | 646 web_contents_->GetRenderViewHost()->DragTargetDrop( |
| 647 event.location(), | 647 event.location(), |
| 648 gfx::Screen::GetCursorScreenPoint(), | 648 gfx::Screen::GetCursorScreenPoint(), |
| 649 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); | 649 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); |
| 650 if (drag_dest_delegate_) | 650 if (drag_dest_delegate_) |
| 651 drag_dest_delegate_->OnDrop(); | 651 drag_dest_delegate_->OnDrop(); |
| 652 return current_drag_op_; | 652 return current_drag_op_; |
| 653 } | 653 } |
| OLD | NEW |