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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 2485763003: Remove access to WebContents in RWHVA::Focus() (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | content/browser/web_contents/web_contents_view_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698