| 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/web_contents/web_contents_view_android.h" | 5 #include "content/browser/web_contents/web_contents_view_android.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "content/browser/android/content_view_core_impl.h" | 10 #include "content/browser/android/content_view_core_impl.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 results->rect = display.bounds(); | 35 results->rect = display.bounds(); |
| 36 // TODO(husky): Remove any system controls from availableRect. | 36 // TODO(husky): Remove any system controls from availableRect. |
| 37 results->available_rect = display.work_area(); | 37 results->available_rect = display.work_area(); |
| 38 results->device_scale_factor = display.device_scale_factor(); | 38 results->device_scale_factor = display.device_scale_factor(); |
| 39 results->orientation_angle = display.RotationAsDegree(); | 39 results->orientation_angle = display.RotationAsDegree(); |
| 40 results->orientation_type = | 40 results->orientation_type = |
| 41 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 41 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 42 gfx::DeviceDisplayInfo info; | 42 gfx::DeviceDisplayInfo info; |
| 43 results->depth = display.color_depth(); | 43 results->depth = display.color_depth(); |
| 44 results->depth_per_component = display.depth_per_component(); | 44 results->depth_per_component = display.depth_per_component(); |
| 45 results->is_monochrome = (results->depth_per_component == 0); | 45 results->is_monochrome = display.is_monochrome(); |
| 46 } | 46 } |
| 47 | 47 |
| 48 WebContentsView* CreateWebContentsView( | 48 WebContentsView* CreateWebContentsView( |
| 49 WebContentsImpl* web_contents, | 49 WebContentsImpl* web_contents, |
| 50 WebContentsViewDelegate* delegate, | 50 WebContentsViewDelegate* delegate, |
| 51 RenderViewHostDelegateView** render_view_host_delegate_view) { | 51 RenderViewHostDelegateView** render_view_host_delegate_view) { |
| 52 WebContentsViewAndroid* rv = new WebContentsViewAndroid( | 52 WebContentsViewAndroid* rv = new WebContentsViewAndroid( |
| 53 web_contents, delegate); | 53 web_contents, delegate); |
| 54 *render_view_host_delegate_view = rv; | 54 *render_view_host_delegate_view = rv; |
| 55 return rv; | 55 return rv; |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 // This is called when we the renderer asks us to take focus back (i.e., it has | 308 // This is called when we the renderer asks us to take focus back (i.e., it has |
| 309 // iterated past the last focusable element on the page). | 309 // iterated past the last focusable element on the page). |
| 310 void WebContentsViewAndroid::TakeFocus(bool reverse) { | 310 void WebContentsViewAndroid::TakeFocus(bool reverse) { |
| 311 if (web_contents_->GetDelegate() && | 311 if (web_contents_->GetDelegate() && |
| 312 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) | 312 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) |
| 313 return; | 313 return; |
| 314 web_contents_->GetRenderWidgetHostView()->Focus(); | 314 web_contents_->GetRenderWidgetHostView()->Focus(); |
| 315 } | 315 } |
| 316 | 316 |
| 317 } // namespace content | 317 } // namespace content |
| OLD | NEW |