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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 1586923002: [UseZoomForDSF] Guest view support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2128 matching lines...) Expand 10 before | Expand all | Expand 10 after
2139 } 2139 }
2140 2140
2141 WebPreferences& RenderFrameImpl::GetWebkitPreferences() { 2141 WebPreferences& RenderFrameImpl::GetWebkitPreferences() {
2142 return render_view_->GetWebkitPreferences(); 2142 return render_view_->GetWebkitPreferences();
2143 } 2143 }
2144 2144
2145 int RenderFrameImpl::ShowContextMenu(ContextMenuClient* client, 2145 int RenderFrameImpl::ShowContextMenu(ContextMenuClient* client,
2146 const ContextMenuParams& params) { 2146 const ContextMenuParams& params) {
2147 DCHECK(client); // A null client means "internal" when we issue callbacks. 2147 DCHECK(client); // A null client means "internal" when we issue callbacks.
2148 ContextMenuParams our_params(params); 2148 ContextMenuParams our_params(params);
2149
2150 blink::WebRect position_in_window(params.x, params.y, 0, 0);
2151 GetRenderWidget()->convertViewportToWindow(&position_in_window);
2152 our_params.x = position_in_window.x;
2153 our_params.y = position_in_window.y;
2154
2149 our_params.custom_context.request_id = pending_context_menus_.Add(client); 2155 our_params.custom_context.request_id = pending_context_menus_.Add(client);
2150 Send(new FrameHostMsg_ContextMenu(routing_id_, our_params)); 2156 Send(new FrameHostMsg_ContextMenu(routing_id_, our_params));
2151 return our_params.custom_context.request_id; 2157 return our_params.custom_context.request_id;
2152 } 2158 }
2153 2159
2154 void RenderFrameImpl::CancelContextMenu(int request_id) { 2160 void RenderFrameImpl::CancelContextMenu(int request_id) {
2155 DCHECK(pending_context_menus_.Lookup(request_id)); 2161 DCHECK(pending_context_menus_.Lookup(request_id));
2156 pending_context_menus_.Remove(request_id); 2162 pending_context_menus_.Remove(request_id);
2157 } 2163 }
2158 2164
(...skipping 3572 matching lines...) Expand 10 before | Expand all | Expand 10 after
5731 media::ConvertToSwitchOutputDeviceCB(web_callbacks); 5737 media::ConvertToSwitchOutputDeviceCB(web_callbacks);
5732 scoped_refptr<media::AudioOutputDevice> device = 5738 scoped_refptr<media::AudioOutputDevice> device =
5733 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), 5739 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(),
5734 security_origin); 5740 security_origin);
5735 media::OutputDeviceStatus status = device->GetDeviceStatus(); 5741 media::OutputDeviceStatus status = device->GetDeviceStatus();
5736 device->Stop(); 5742 device->Stop();
5737 callback.Run(status); 5743 callback.Run(status);
5738 } 5744 }
5739 5745
5740 } // namespace content 5746 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698