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

Side by Side Diff: extensions/browser/guest_view/app_view/app_view_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, 6 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/app_view/app_view_guest.h" 5 #include "extensions/browser/guest_view/app_view/app_view_guest.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/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 app_view_guest_delegate_(ExtensionsAPIClient::Get() 108 app_view_guest_delegate_(ExtensionsAPIClient::Get()
109 ->CreateAppViewGuestDelegate()), 109 ->CreateAppViewGuestDelegate()),
110 weak_ptr_factory_(this) { 110 weak_ptr_factory_(this) {
111 if (app_view_guest_delegate_) 111 if (app_view_guest_delegate_)
112 app_delegate_.reset(app_view_guest_delegate_->CreateAppDelegate()); 112 app_delegate_.reset(app_view_guest_delegate_->CreateAppDelegate());
113 } 113 }
114 114
115 AppViewGuest::~AppViewGuest() { 115 AppViewGuest::~AppViewGuest() {
116 } 116 }
117 117
118 bool AppViewGuest::HandleContextMenu(const content::ContextMenuParams& params) { 118 bool AppViewGuest::HandleContextMenu(RenderFrameHost* render_frame_host,
119 const content::ContextMenuParams& params) {
119 if (app_view_guest_delegate_) { 120 if (app_view_guest_delegate_) {
120 return app_view_guest_delegate_->HandleContextMenu(web_contents(), params); 121 return app_view_guest_delegate_->HandleContextMenu(web_contents(), params);
121 } 122 }
122 return false; 123 return false;
123 } 124 }
124 125
125 void AppViewGuest::RequestMediaAccessPermission( 126 void AppViewGuest::RequestMediaAccessPermission(
126 WebContents* web_contents, 127 WebContents* web_contents,
127 const content::MediaStreamRequest& request, 128 const content::MediaStreamRequest& request,
128 const content::MediaResponseCallback& callback) { 129 const content::MediaResponseCallback& callback) {
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 282
282 std::vector<int> AppViewGuest::GetAllRegisteredInstanceIdsForTesting() { 283 std::vector<int> AppViewGuest::GetAllRegisteredInstanceIdsForTesting() {
283 std::vector<int> instances; 284 std::vector<int> instances;
284 for (const auto& key_value : pending_response_map.Get()) { 285 for (const auto& key_value : pending_response_map.Get()) {
285 instances.push_back(key_value.first); 286 instances.push_back(key_value.first);
286 } 287 }
287 return instances; 288 return instances;
288 } 289 }
289 290
290 } // namespace extensions 291 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698