| OLD | NEW |
| 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 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 suppress_next_char_events_(false), | 201 suppress_next_char_events_(false), |
| 202 pending_mouse_lock_request_(false), | 202 pending_mouse_lock_request_(false), |
| 203 allow_privileged_mouse_lock_(false), | 203 allow_privileged_mouse_lock_(false), |
| 204 has_touch_handler_(false), | 204 has_touch_handler_(false), |
| 205 is_in_touchpad_gesture_scroll_(false), | 205 is_in_touchpad_gesture_scroll_(false), |
| 206 is_in_touchscreen_gesture_scroll_(false), | 206 is_in_touchscreen_gesture_scroll_(false), |
| 207 received_paint_after_load_(false), | 207 received_paint_after_load_(false), |
| 208 next_browser_snapshot_id_(1), | 208 next_browser_snapshot_id_(1), |
| 209 owned_by_render_frame_host_(false), | 209 owned_by_render_frame_host_(false), |
| 210 is_focused_(false), | 210 is_focused_(false), |
| 211 scale_input_to_viewport_(IsUseZoomForDSFEnabled()), | |
| 212 hung_renderer_delay_( | 211 hung_renderer_delay_( |
| 213 base::TimeDelta::FromMilliseconds(kHungRendererDelayMs)), | 212 base::TimeDelta::FromMilliseconds(kHungRendererDelayMs)), |
| 214 new_content_rendering_delay_( | 213 new_content_rendering_delay_( |
| 215 base::TimeDelta::FromMilliseconds(kNewContentRenderingDelayMs)), | 214 base::TimeDelta::FromMilliseconds(kNewContentRenderingDelayMs)), |
| 216 weak_factory_(this) { | 215 weak_factory_(this) { |
| 217 CHECK(delegate_); | 216 CHECK(delegate_); |
| 218 CHECK_NE(MSG_ROUTING_NONE, routing_id_); | 217 CHECK_NE(MSG_ROUTING_NONE, routing_id_); |
| 219 | 218 |
| 220 std::pair<RoutingIDWidgetMap::iterator, bool> result = | 219 std::pair<RoutingIDWidgetMap::iterator, bool> result = |
| 221 g_routing_id_widget_map.Get().insert(std::make_pair( | 220 g_routing_id_widget_map.Get().insert(std::make_pair( |
| (...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1223 | 1222 |
| 1224 void RenderWidgetHostImpl::GetWebScreenInfo(blink::WebScreenInfo* result) { | 1223 void RenderWidgetHostImpl::GetWebScreenInfo(blink::WebScreenInfo* result) { |
| 1225 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::GetWebScreenInfo"); | 1224 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::GetWebScreenInfo"); |
| 1226 if (view_) | 1225 if (view_) |
| 1227 view_->GetScreenInfo(result); | 1226 view_->GetScreenInfo(result); |
| 1228 else | 1227 else |
| 1229 RenderWidgetHostViewBase::GetDefaultScreenInfo(result); | 1228 RenderWidgetHostViewBase::GetDefaultScreenInfo(result); |
| 1230 // TODO(sievers): find a way to make this done another way so the method | 1229 // TODO(sievers): find a way to make this done another way so the method |
| 1231 // can be const. | 1230 // can be const. |
| 1232 latency_tracker_.set_device_scale_factor(result->deviceScaleFactor); | 1231 latency_tracker_.set_device_scale_factor(result->deviceScaleFactor); |
| 1233 if (scale_input_to_viewport_) | 1232 if (IsUseZoomForDSFEnabled()) |
| 1234 input_router_->SetDeviceScaleFactor(result->deviceScaleFactor); | 1233 input_router_->SetDeviceScaleFactor(result->deviceScaleFactor); |
| 1235 } | 1234 } |
| 1236 | 1235 |
| 1237 bool RenderWidgetHostImpl::GetScreenColorProfile( | 1236 bool RenderWidgetHostImpl::GetScreenColorProfile( |
| 1238 std::vector<char>* color_profile) { | 1237 std::vector<char>* color_profile) { |
| 1239 DCHECK(color_profile->empty()); | 1238 DCHECK(color_profile->empty()); |
| 1240 if (view_) | 1239 if (view_) |
| 1241 return view_->GetScreenColorProfile(color_profile); | 1240 return view_->GetScreenColorProfile(color_profile); |
| 1242 return false; | 1241 return false; |
| 1243 } | 1242 } |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2152 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; | 2151 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; |
| 2153 } | 2152 } |
| 2154 | 2153 |
| 2155 BrowserAccessibilityManager* | 2154 BrowserAccessibilityManager* |
| 2156 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { | 2155 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { |
| 2157 return delegate_ ? | 2156 return delegate_ ? |
| 2158 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; | 2157 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; |
| 2159 } | 2158 } |
| 2160 | 2159 |
| 2161 } // namespace content | 2160 } // namespace content |
| OLD | NEW |