| 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 <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 gfx::NativeViewAccessible | 593 gfx::NativeViewAccessible |
| 594 RenderWidgetHostViewAndroid::GetNativeViewAccessible() { | 594 RenderWidgetHostViewAndroid::GetNativeViewAccessible() { |
| 595 NOTIMPLEMENTED(); | 595 NOTIMPLEMENTED(); |
| 596 return NULL; | 596 return NULL; |
| 597 } | 597 } |
| 598 | 598 |
| 599 void RenderWidgetHostViewAndroid::Focus() { | 599 void RenderWidgetHostViewAndroid::Focus() { |
| 600 host_->Focus(); | 600 host_->Focus(); |
| 601 if (overscroll_controller_) | 601 if (overscroll_controller_) |
| 602 overscroll_controller_->Enable(); | 602 overscroll_controller_->Enable(); |
| 603 if (content_view_core_) { | |
| 604 WebContentsImpl* web_contents_impl = | |
| 605 static_cast<WebContentsImpl*>(content_view_core_->GetWebContents()); | |
| 606 if (web_contents_impl->ShowingInterstitialPage()) | |
| 607 content_view_core_->ForceUpdateImeAdapter(GetNativeImeAdapter()); | |
| 608 } | |
| 609 } | 603 } |
| 610 | 604 |
| 611 bool RenderWidgetHostViewAndroid::HasFocus() const { | 605 bool RenderWidgetHostViewAndroid::HasFocus() const { |
| 612 if (!content_view_core_) | 606 if (!content_view_core_) |
| 613 return false; // ContentViewCore not created yet. | 607 return false; // ContentViewCore not created yet. |
| 614 | 608 |
| 615 return content_view_core_->HasFocus(); | 609 return content_view_core_->HasFocus(); |
| 616 } | 610 } |
| 617 | 611 |
| 618 bool RenderWidgetHostViewAndroid::IsSurfaceAvailableForCopy() const { | 612 bool RenderWidgetHostViewAndroid::IsSurfaceAvailableForCopy() const { |
| (...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1966 case ui::MotionEvent::ACTION_UP: | 1960 case ui::MotionEvent::ACTION_UP: |
| 1967 case ui::MotionEvent::ACTION_POINTER_UP: | 1961 case ui::MotionEvent::ACTION_POINTER_UP: |
| 1968 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", | 1962 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", |
| 1969 delta.InMicroseconds(), 1, 1000000, 50); | 1963 delta.InMicroseconds(), 1, 1000000, 50); |
| 1970 default: | 1964 default: |
| 1971 return; | 1965 return; |
| 1972 } | 1966 } |
| 1973 } | 1967 } |
| 1974 | 1968 |
| 1975 } // namespace content | 1969 } // namespace content |
| OLD | NEW |