| 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_android.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
| 6 | 6 |
| 7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
| 8 | 8 |
| 9 #include "base/android/build_info.h" | 9 #include "base/android/build_info.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 } | 453 } |
| 454 | 454 |
| 455 void RenderWidgetHostViewAndroid::Focus() { | 455 void RenderWidgetHostViewAndroid::Focus() { |
| 456 host_->Focus(); | 456 host_->Focus(); |
| 457 host_->SetInputMethodActive(true); | 457 host_->SetInputMethodActive(true); |
| 458 if (overscroll_effect_) | 458 if (overscroll_effect_) |
| 459 overscroll_effect_->Enable(); | 459 overscroll_effect_->Enable(); |
| 460 } | 460 } |
| 461 | 461 |
| 462 void RenderWidgetHostViewAndroid::Blur() { | 462 void RenderWidgetHostViewAndroid::Blur() { |
| 463 host_->ExecuteEditCommand("Unselect", ""); | |
| 464 host_->SetInputMethodActive(false); | 463 host_->SetInputMethodActive(false); |
| 465 host_->Blur(); | 464 host_->Blur(); |
| 466 if (overscroll_effect_) | 465 if (overscroll_effect_) |
| 467 overscroll_effect_->Disable(); | 466 overscroll_effect_->Disable(); |
| 468 } | 467 } |
| 469 | 468 |
| 470 bool RenderWidgetHostViewAndroid::HasFocus() const { | 469 bool RenderWidgetHostViewAndroid::HasFocus() const { |
| 471 if (!content_view_core_) | 470 if (!content_view_core_) |
| 472 return false; // ContentViewCore not created yet. | 471 return false; // ContentViewCore not created yet. |
| 473 | 472 |
| (...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1850 results->orientationAngle = display.RotationAsDegree(); | 1849 results->orientationAngle = display.RotationAsDegree(); |
| 1851 results->orientationType = | 1850 results->orientationType = |
| 1852 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 1851 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 1853 gfx::DeviceDisplayInfo info; | 1852 gfx::DeviceDisplayInfo info; |
| 1854 results->depth = info.GetBitsPerPixel(); | 1853 results->depth = info.GetBitsPerPixel(); |
| 1855 results->depthPerComponent = info.GetBitsPerComponent(); | 1854 results->depthPerComponent = info.GetBitsPerComponent(); |
| 1856 results->isMonochrome = (results->depthPerComponent == 0); | 1855 results->isMonochrome = (results->depthPerComponent == 0); |
| 1857 } | 1856 } |
| 1858 | 1857 |
| 1859 } // namespace content | 1858 } // namespace content |
| OLD | NEW |