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_view_base.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "content/browser/accessibility/browser_accessibility_manager.h" | 9 #include "content/browser/accessibility/browser_accessibility_manager.h" |
10 #include "content/browser/gpu/gpu_data_manager_impl.h" | 10 #include "content/browser/gpu/gpu_data_manager_impl.h" |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 return true; | 301 return true; |
302 } | 302 } |
303 | 303 |
304 void RenderWidgetHostViewBase::DidUnregisterFromTextInputManager( | 304 void RenderWidgetHostViewBase::DidUnregisterFromTextInputManager( |
305 TextInputManager* text_input_manager) { | 305 TextInputManager* text_input_manager) { |
306 DCHECK(text_input_manager && text_input_manager_ == text_input_manager); | 306 DCHECK(text_input_manager && text_input_manager_ == text_input_manager); |
307 | 307 |
308 text_input_manager_ = nullptr; | 308 text_input_manager_ = nullptr; |
309 } | 309 } |
310 | 310 |
| 311 void RenderWidgetHostViewBase::SetPageScaleFactorForSubframes( |
| 312 float page_scale) { |
| 313 RenderWidgetHostImpl* host = |
| 314 RenderWidgetHostImpl::From(GetRenderWidgetHost()); |
| 315 |
| 316 if (host && host->delegate()) |
| 317 host->delegate()->SetPageScaleFactorForSubframes(page_scale); |
| 318 } |
| 319 |
311 base::WeakPtr<RenderWidgetHostViewBase> RenderWidgetHostViewBase::GetWeakPtr() { | 320 base::WeakPtr<RenderWidgetHostViewBase> RenderWidgetHostViewBase::GetWeakPtr() { |
312 return weak_factory_.GetWeakPtr(); | 321 return weak_factory_.GetWeakPtr(); |
313 } | 322 } |
314 | 323 |
315 std::unique_ptr<SyntheticGestureTarget> | 324 std::unique_ptr<SyntheticGestureTarget> |
316 RenderWidgetHostViewBase::CreateSyntheticGestureTarget() { | 325 RenderWidgetHostViewBase::CreateSyntheticGestureTarget() { |
317 RenderWidgetHostImpl* host = | 326 RenderWidgetHostImpl* host = |
318 RenderWidgetHostImpl::From(GetRenderWidgetHost()); | 327 RenderWidgetHostImpl::From(GetRenderWidgetHost()); |
319 return std::unique_ptr<SyntheticGestureTarget>( | 328 return std::unique_ptr<SyntheticGestureTarget>( |
320 new SyntheticGestureTargetBase(host)); | 329 new SyntheticGestureTargetBase(host)); |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 | 535 |
527 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { | 536 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { |
528 return false; | 537 return false; |
529 } | 538 } |
530 | 539 |
531 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { | 540 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { |
532 return cc::SurfaceId(); | 541 return cc::SurfaceId(); |
533 } | 542 } |
534 | 543 |
535 } // namespace content | 544 } // namespace content |
OLD | NEW |