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

Side by Side Diff: content/browser/renderer_host/render_widget_host_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 (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/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 text_direction_canceled_(false), 204 text_direction_canceled_(false),
205 suppress_next_char_events_(false), 205 suppress_next_char_events_(false),
206 pending_mouse_lock_request_(false), 206 pending_mouse_lock_request_(false),
207 allow_privileged_mouse_lock_(false), 207 allow_privileged_mouse_lock_(false),
208 has_touch_handler_(false), 208 has_touch_handler_(false),
209 is_in_gesture_scroll_(false), 209 is_in_gesture_scroll_(false),
210 received_paint_after_load_(false), 210 received_paint_after_load_(false),
211 next_browser_snapshot_id_(1), 211 next_browser_snapshot_id_(1),
212 owned_by_render_frame_host_(false), 212 owned_by_render_frame_host_(false),
213 is_focused_(false), 213 is_focused_(false),
214 scale_input_to_viewport_(IsUseZoomForDSFEnabled()),
214 hung_renderer_delay_( 215 hung_renderer_delay_(
215 base::TimeDelta::FromMilliseconds(kHungRendererDelayMs)), 216 base::TimeDelta::FromMilliseconds(kHungRendererDelayMs)),
216 new_content_rendering_delay_( 217 new_content_rendering_delay_(
217 base::TimeDelta::FromMilliseconds(kNewContentRenderingDelayMs)), 218 base::TimeDelta::FromMilliseconds(kNewContentRenderingDelayMs)),
218 mouse_wheel_coalesce_timer_(new base::ElapsedTimer()), 219 mouse_wheel_coalesce_timer_(new base::ElapsedTimer()),
219 weak_factory_(this) { 220 weak_factory_(this) {
220 CHECK(delegate_); 221 CHECK(delegate_);
221 CHECK_NE(MSG_ROUTING_NONE, routing_id_); 222 CHECK_NE(MSG_ROUTING_NONE, routing_id_);
222 223
223 std::pair<RoutingIDWidgetMap::iterator, bool> result = 224 std::pair<RoutingIDWidgetMap::iterator, bool> result =
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 1258
1258 void RenderWidgetHostImpl::GetWebScreenInfo(blink::WebScreenInfo* result) { 1259 void RenderWidgetHostImpl::GetWebScreenInfo(blink::WebScreenInfo* result) {
1259 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::GetWebScreenInfo"); 1260 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::GetWebScreenInfo");
1260 if (view_) 1261 if (view_)
1261 view_->GetScreenInfo(result); 1262 view_->GetScreenInfo(result);
1262 else 1263 else
1263 RenderWidgetHostViewBase::GetDefaultScreenInfo(result); 1264 RenderWidgetHostViewBase::GetDefaultScreenInfo(result);
1264 // TODO(sievers): find a way to make this done another way so the method 1265 // TODO(sievers): find a way to make this done another way so the method
1265 // can be const. 1266 // can be const.
1266 latency_tracker_.set_device_scale_factor(result->deviceScaleFactor); 1267 latency_tracker_.set_device_scale_factor(result->deviceScaleFactor);
1267 if (IsUseZoomForDSFEnabled()) 1268 if (scale_input_to_viewport_)
1268 input_router_->SetDeviceScaleFactor(result->deviceScaleFactor); 1269 input_router_->SetDeviceScaleFactor(result->deviceScaleFactor);
1269 } 1270 }
1270 1271
1271 bool RenderWidgetHostImpl::GetScreenColorProfile( 1272 bool RenderWidgetHostImpl::GetScreenColorProfile(
1272 std::vector<char>* color_profile) { 1273 std::vector<char>* color_profile) {
1273 DCHECK(color_profile->empty()); 1274 DCHECK(color_profile->empty());
1274 if (view_) 1275 if (view_)
1275 return view_->GetScreenColorProfile(color_profile); 1276 return view_->GetScreenColorProfile(color_profile);
1276 return false; 1277 return false;
1277 } 1278 }
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
2246 } 2247 }
2247 2248
2248 #if defined(OS_WIN) 2249 #if defined(OS_WIN)
2249 gfx::NativeViewAccessible 2250 gfx::NativeViewAccessible
2250 RenderWidgetHostImpl::GetParentNativeViewAccessible() { 2251 RenderWidgetHostImpl::GetParentNativeViewAccessible() {
2251 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; 2252 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL;
2252 } 2253 }
2253 #endif 2254 #endif
2254 2255
2255 } // namespace content 2256 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698