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

Side by Side Diff: extensions/browser/guest_view/extension_options/extension_options_guest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/guest_view/extension_options/extension_options_gues t.h" 5 #include "extensions/browser/guest_view/extension_options/extension_options_gues t.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 return extension_options_guest_delegate_->OpenURLInNewTab(params); 180 return extension_options_guest_delegate_->OpenURLInNewTab(params);
181 } 181 }
182 182
183 void ExtensionOptionsGuest::CloseContents(WebContents* source) { 183 void ExtensionOptionsGuest::CloseContents(WebContents* source) {
184 DispatchEventToView(base::WrapUnique( 184 DispatchEventToView(base::WrapUnique(
185 new GuestViewEvent(extension_options_internal::OnClose::kEventName, 185 new GuestViewEvent(extension_options_internal::OnClose::kEventName,
186 base::WrapUnique(new base::DictionaryValue())))); 186 base::WrapUnique(new base::DictionaryValue()))));
187 } 187 }
188 188
189 bool ExtensionOptionsGuest::HandleContextMenu( 189 bool ExtensionOptionsGuest::HandleContextMenu(
190 RenderFrameHost* render_frame_host,
190 const content::ContextMenuParams& params) { 191 const content::ContextMenuParams& params) {
191 if (!extension_options_guest_delegate_) 192 if (!extension_options_guest_delegate_)
192 return false; 193 return false;
193 194
194 return extension_options_guest_delegate_->HandleContextMenu(params); 195 return extension_options_guest_delegate_->HandleContextMenu(params);
195 } 196 }
196 197
197 bool ExtensionOptionsGuest::ShouldCreateWebContents( 198 bool ExtensionOptionsGuest::ShouldCreateWebContents(
198 WebContents* web_contents, 199 WebContents* web_contents,
199 int32_t route_id, 200 int32_t route_id,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 SetGuestZoomLevelToMatchEmbedder(); 234 SetGuestZoomLevelToMatchEmbedder();
234 235
235 if (!url::IsSameOriginWith(params.url, options_page_)) { 236 if (!url::IsSameOriginWith(params.url, options_page_)) {
236 bad_message::ReceivedBadMessage(web_contents()->GetRenderProcessHost(), 237 bad_message::ReceivedBadMessage(web_contents()->GetRenderProcessHost(),
237 bad_message::EOG_BAD_ORIGIN); 238 bad_message::EOG_BAD_ORIGIN);
238 } 239 }
239 } 240 }
240 } 241 }
241 242
242 } // namespace extensions 243 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698