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

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

Issue 2089933002: Context Menu Refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing nits Created 4 years, 5 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_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 4009 matching lines...) Expand 10 before | Expand all | Expand 10 after
4020 void WebContentsImpl::RenderFrameDeleted(RenderFrameHost* render_frame_host) { 4020 void WebContentsImpl::RenderFrameDeleted(RenderFrameHost* render_frame_host) {
4021 FOR_EACH_OBSERVER(WebContentsObserver, 4021 FOR_EACH_OBSERVER(WebContentsObserver,
4022 observers_, 4022 observers_,
4023 RenderFrameDeleted(render_frame_host)); 4023 RenderFrameDeleted(render_frame_host));
4024 } 4024 }
4025 4025
4026 void WebContentsImpl::ShowContextMenu(RenderFrameHost* render_frame_host, 4026 void WebContentsImpl::ShowContextMenu(RenderFrameHost* render_frame_host,
4027 const ContextMenuParams& params) { 4027 const ContextMenuParams& params) {
4028 ContextMenuParams context_menu_params(params); 4028 ContextMenuParams context_menu_params(params);
4029 // Allow WebContentsDelegates to handle the context menu operation first. 4029 // Allow WebContentsDelegates to handle the context menu operation first.
4030 if (delegate_ && delegate_->HandleContextMenu(context_menu_params)) 4030 if (delegate_ && delegate_->HandleContextMenu(render_frame_host,
4031 context_menu_params))
4031 return; 4032 return;
4032 4033
4033 render_view_host_delegate_view_->ShowContextMenu(render_frame_host, 4034 render_view_host_delegate_view_->ShowContextMenu(render_frame_host,
4034 context_menu_params); 4035 context_menu_params);
4035 } 4036 }
4036 4037
4037 void WebContentsImpl::RunJavaScriptMessage( 4038 void WebContentsImpl::RunJavaScriptMessage(
4038 RenderFrameHost* render_frame_host, 4039 RenderFrameHost* render_frame_host,
4039 const base::string16& message, 4040 const base::string16& message,
4040 const base::string16& default_prompt, 4041 const base::string16& default_prompt,
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
5127 for (RenderViewHost* render_view_host : render_view_host_set) 5128 for (RenderViewHost* render_view_host : render_view_host_set)
5128 render_view_host->OnWebkitPreferencesChanged(); 5129 render_view_host->OnWebkitPreferencesChanged();
5129 } 5130 }
5130 5131
5131 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 5132 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
5132 JavaScriptDialogManager* dialog_manager) { 5133 JavaScriptDialogManager* dialog_manager) {
5133 dialog_manager_ = dialog_manager; 5134 dialog_manager_ = dialog_manager;
5134 } 5135 }
5135 5136
5136 } // namespace content 5137 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698