| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 // WebContentsViewAura, RenderViewHostDelegateView implementation: | 944 // WebContentsViewAura, RenderViewHostDelegateView implementation: |
| 945 | 945 |
| 946 void WebContentsViewAura::ShowContextMenu(RenderFrameHost* render_frame_host, | 946 void WebContentsViewAura::ShowContextMenu(RenderFrameHost* render_frame_host, |
| 947 const ContextMenuParams& params) { | 947 const ContextMenuParams& params) { |
| 948 TouchSelectionControllerClientAura* selection_controller_client = | 948 TouchSelectionControllerClientAura* selection_controller_client = |
| 949 GetSelectionControllerClient(); | 949 GetSelectionControllerClient(); |
| 950 if (selection_controller_client && | 950 if (selection_controller_client && |
| 951 selection_controller_client->HandleContextMenu(params)) { | 951 selection_controller_client->HandleContextMenu(params)) { |
| 952 return; | 952 return; |
| 953 } | 953 } |
| 954 |
| 954 if (delegate_) { | 955 if (delegate_) { |
| 955 RenderWidgetHostViewAura* view = ToRenderWidgetHostViewAura( | 956 RenderWidgetHostViewAura* view = ToRenderWidgetHostViewAura( |
| 956 web_contents_->GetRenderWidgetHostView()); | 957 web_contents_->GetRenderWidgetHostView()); |
| 957 if (view) | 958 if (view && !view->OnShowContextMenu(params)) |
| 958 view->OnShowContextMenu(); | 959 return; |
| 959 | 960 |
| 960 delegate_->ShowContextMenu(render_frame_host, params); | 961 delegate_->ShowContextMenu(render_frame_host, params); |
| 961 // WARNING: we may have been deleted during the call to ShowContextMenu(). | 962 // WARNING: we may have been deleted during the call to ShowContextMenu(). |
| 962 } | 963 } |
| 963 } | 964 } |
| 964 | 965 |
| 965 void WebContentsViewAura::StartDragging( | 966 void WebContentsViewAura::StartDragging( |
| 966 const DropData& drop_data, | 967 const DropData& drop_data, |
| 967 blink::WebDragOperationsMask operations, | 968 blink::WebDragOperationsMask operations, |
| 968 const gfx::ImageSkia& image, | 969 const gfx::ImageSkia& image, |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1315 if (visible) { | 1316 if (visible) { |
| 1316 if (!web_contents_->should_normally_be_visible()) | 1317 if (!web_contents_->should_normally_be_visible()) |
| 1317 web_contents_->WasShown(); | 1318 web_contents_->WasShown(); |
| 1318 } else { | 1319 } else { |
| 1319 if (web_contents_->should_normally_be_visible()) | 1320 if (web_contents_->should_normally_be_visible()) |
| 1320 web_contents_->WasHidden(); | 1321 web_contents_->WasHidden(); |
| 1321 } | 1322 } |
| 1322 } | 1323 } |
| 1323 | 1324 |
| 1324 } // namespace content | 1325 } // namespace content |
| OLD | NEW |