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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2759903002: Accessible bounds should include device scale factor on Windows. (Closed)
Patch Set: Rename to use_custom_device_scale_factor_for_testing Created 3 years, 9 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
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 24 matching lines...) Expand all
35 #include "content/browser/frame_host/render_frame_host_delegate.h" 35 #include "content/browser/frame_host/render_frame_host_delegate.h"
36 #include "content/browser/frame_host/render_frame_proxy_host.h" 36 #include "content/browser/frame_host/render_frame_proxy_host.h"
37 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" 37 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
38 #include "content/browser/installedapp/installed_app_provider_impl_default.h" 38 #include "content/browser/installedapp/installed_app_provider_impl_default.h"
39 #include "content/browser/loader/resource_dispatcher_host_impl.h" 39 #include "content/browser/loader/resource_dispatcher_host_impl.h"
40 #include "content/browser/media/media_interface_proxy.h" 40 #include "content/browser/media/media_interface_proxy.h"
41 #include "content/browser/media/session/media_session_service_impl.h" 41 #include "content/browser/media/session/media_session_service_impl.h"
42 #include "content/browser/permissions/permission_service_context.h" 42 #include "content/browser/permissions/permission_service_context.h"
43 #include "content/browser/permissions/permission_service_impl.h" 43 #include "content/browser/permissions/permission_service_impl.h"
44 #include "content/browser/presentation/presentation_service_impl.h" 44 #include "content/browser/presentation/presentation_service_impl.h"
45 #include "content/browser/renderer_host/dip_util.h"
45 #include "content/browser/renderer_host/input/input_router_impl.h" 46 #include "content/browser/renderer_host/input/input_router_impl.h"
46 #include "content/browser/renderer_host/input/timeout_monitor.h" 47 #include "content/browser/renderer_host/input/timeout_monitor.h"
47 #include "content/browser/renderer_host/media/media_devices_dispatcher_host.h" 48 #include "content/browser/renderer_host/media/media_devices_dispatcher_host.h"
48 #include "content/browser/renderer_host/render_process_host_impl.h" 49 #include "content/browser/renderer_host/render_process_host_impl.h"
49 #include "content/browser/renderer_host/render_view_host_delegate.h" 50 #include "content/browser/renderer_host/render_view_host_delegate.h"
50 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 51 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
51 #include "content/browser/renderer_host/render_view_host_impl.h" 52 #include "content/browser/renderer_host/render_view_host_impl.h"
52 #include "content/browser/renderer_host/render_widget_host_delegate.h" 53 #include "content/browser/renderer_host/render_widget_host_delegate.h"
53 #include "content/browser/renderer_host/render_widget_host_impl.h" 54 #include "content/browser/renderer_host/render_widget_host_impl.h"
54 #include "content/browser/renderer_host/render_widget_host_view_base.h" 55 #include "content/browser/renderer_host/render_widget_host_view_base.h"
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 802
802 gfx::Point RenderFrameHostImpl::AccessibilityOriginInScreen( 803 gfx::Point RenderFrameHostImpl::AccessibilityOriginInScreen(
803 const gfx::Rect& bounds) const { 804 const gfx::Rect& bounds) const {
804 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( 805 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>(
805 render_view_host_->GetWidget()->GetView()); 806 render_view_host_->GetWidget()->GetView());
806 if (view) 807 if (view)
807 return view->AccessibilityOriginInScreen(bounds); 808 return view->AccessibilityOriginInScreen(bounds);
808 return gfx::Point(); 809 return gfx::Point();
809 } 810 }
810 811
812 float RenderFrameHostImpl::AccessibilityGetDeviceScaleFactor() const {
813 RenderWidgetHostView* view = render_view_host_->GetWidget()->GetView();
814 if (view)
815 return GetScaleFactorForView(view);
816 return 1.0f;
817 }
818
811 void RenderFrameHostImpl::AccessibilityReset() { 819 void RenderFrameHostImpl::AccessibilityReset() {
812 accessibility_reset_token_ = g_next_accessibility_reset_token++; 820 accessibility_reset_token_ = g_next_accessibility_reset_token++;
813 Send(new AccessibilityMsg_Reset(routing_id_, accessibility_reset_token_)); 821 Send(new AccessibilityMsg_Reset(routing_id_, accessibility_reset_token_));
814 } 822 }
815 823
816 void RenderFrameHostImpl::AccessibilityFatalError() { 824 void RenderFrameHostImpl::AccessibilityFatalError() {
817 browser_accessibility_manager_.reset(NULL); 825 browser_accessibility_manager_.reset(NULL);
818 if (accessibility_reset_token_) 826 if (accessibility_reset_token_)
819 return; 827 return;
820 828
(...skipping 2677 matching lines...) Expand 10 before | Expand all | Expand 10 after
3498 GetUserData(kRenderFrameHostAndroidKey)); 3506 GetUserData(kRenderFrameHostAndroidKey));
3499 if (!render_frame_host_android) { 3507 if (!render_frame_host_android) {
3500 render_frame_host_android = new RenderFrameHostAndroid(this); 3508 render_frame_host_android = new RenderFrameHostAndroid(this);
3501 SetUserData(kRenderFrameHostAndroidKey, render_frame_host_android); 3509 SetUserData(kRenderFrameHostAndroidKey, render_frame_host_android);
3502 } 3510 }
3503 return render_frame_host_android->GetJavaObject(); 3511 return render_frame_host_android->GetJavaObject();
3504 } 3512 }
3505 #endif 3513 #endif
3506 3514
3507 } // namespace content 3515 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698