| 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_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 2715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2726 | 2726 |
| 2727 void WebContentsImpl::ShowContextMenu(RenderFrameHost* render_frame_host, | 2727 void WebContentsImpl::ShowContextMenu(RenderFrameHost* render_frame_host, |
| 2728 const ContextMenuParams& params) { | 2728 const ContextMenuParams& params) { |
| 2729 // Allow WebContentsDelegates to handle the context menu operation first. | 2729 // Allow WebContentsDelegates to handle the context menu operation first. |
| 2730 if (delegate_ && delegate_->HandleContextMenu(params)) | 2730 if (delegate_ && delegate_->HandleContextMenu(params)) |
| 2731 return; | 2731 return; |
| 2732 | 2732 |
| 2733 render_view_host_delegate_view_->ShowContextMenu(render_frame_host, params); | 2733 render_view_host_delegate_view_->ShowContextMenu(render_frame_host, params); |
| 2734 } | 2734 } |
| 2735 | 2735 |
| 2736 void WebContentsImpl::OnDomOperationResponse( |
| 2737 const DomOperationNotificationDetails& details) { |
| 2738 NotificationService::current()->Notify( |
| 2739 NOTIFICATION_DOM_OPERATION_RESPONSE, |
| 2740 Source<WebContents>(this), |
| 2741 Details<const DomOperationNotificationDetails>(&details)); |
| 2742 } |
| 2743 |
| 2736 WebContents* WebContentsImpl::GetAsWebContents() { | 2744 WebContents* WebContentsImpl::GetAsWebContents() { |
| 2737 return this; | 2745 return this; |
| 2738 } | 2746 } |
| 2739 | 2747 |
| 2740 RenderViewHostDelegateView* WebContentsImpl::GetDelegateView() { | 2748 RenderViewHostDelegateView* WebContentsImpl::GetDelegateView() { |
| 2741 return render_view_host_delegate_view_; | 2749 return render_view_host_delegate_view_; |
| 2742 } | 2750 } |
| 2743 | 2751 |
| 2744 RenderViewHostDelegate::RendererManagement* | 2752 RenderViewHostDelegate::RendererManagement* |
| 2745 WebContentsImpl::GetRendererManagementDelegate() { | 2753 WebContentsImpl::GetRendererManagementDelegate() { |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3644 | 3652 |
| 3645 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3653 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
| 3646 if (!delegate_) | 3654 if (!delegate_) |
| 3647 return; | 3655 return; |
| 3648 const gfx::Size new_size = GetPreferredSize(); | 3656 const gfx::Size new_size = GetPreferredSize(); |
| 3649 if (new_size != old_size) | 3657 if (new_size != old_size) |
| 3650 delegate_->UpdatePreferredSize(this, new_size); | 3658 delegate_->UpdatePreferredSize(this, new_size); |
| 3651 } | 3659 } |
| 3652 | 3660 |
| 3653 } // namespace content | 3661 } // namespace content |
| OLD | NEW |