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

Side by Side Diff: content/browser/web_contents/web_contents_view_android.cc

Issue 2528823002: Separate SwipeRefreshHandler and ContentViewCore (Closed)
Patch Set: Fix non-Android compile issue Created 4 years 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
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/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 "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 web_contents_->GetInterstitialPage() 104 web_contents_->GetInterstitialPage()
105 ->GetMainFrame() 105 ->GetMainFrame()
106 ->GetRenderViewHost() 106 ->GetRenderViewHost()
107 ->GetWidget() 107 ->GetWidget()
108 ->GetView()); 108 ->GetView());
109 if (rwhv) 109 if (rwhv)
110 rwhv->SetContentViewCore(content_view_core_); 110 rwhv->SetContentViewCore(content_view_core_);
111 } 111 }
112 } 112 }
113 113
114 void WebContentsViewAndroid::SetOverscrollRefreshHandler(
115 std::unique_ptr<ui::OverscrollRefreshHandler> overscroll_refresh_handler) {
116 overscroll_refresh_handler_ = std::move(overscroll_refresh_handler);
117 }
118
119 ui::OverscrollRefreshHandler*
120 WebContentsViewAndroid::GetOverscrollRefreshHandler() const {
121 return overscroll_refresh_handler_.get();
122 }
123
114 gfx::NativeView WebContentsViewAndroid::GetNativeView() const { 124 gfx::NativeView WebContentsViewAndroid::GetNativeView() const {
115 return const_cast<gfx::NativeView>(&view_); 125 return const_cast<gfx::NativeView>(&view_);
116 } 126 }
117 127
118 gfx::NativeView WebContentsViewAndroid::GetContentNativeView() const { 128 gfx::NativeView WebContentsViewAndroid::GetContentNativeView() const {
119 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); 129 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView();
120 if (rwhv) 130 if (rwhv)
121 return rwhv->GetNativeView(); 131 return rwhv->GetNativeView();
122 132
123 // TODO(sievers): This should return null. 133 // TODO(sievers): This should return null.
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 // This is called when we the renderer asks us to take focus back (i.e., it has 374 // This is called when we the renderer asks us to take focus back (i.e., it has
365 // iterated past the last focusable element on the page). 375 // iterated past the last focusable element on the page).
366 void WebContentsViewAndroid::TakeFocus(bool reverse) { 376 void WebContentsViewAndroid::TakeFocus(bool reverse) {
367 if (web_contents_->GetDelegate() && 377 if (web_contents_->GetDelegate() &&
368 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) 378 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse))
369 return; 379 return;
370 web_contents_->GetRenderWidgetHostView()->Focus(); 380 web_contents_->GetRenderWidgetHostView()->Focus();
371 } 381 }
372 382
373 } // namespace content 383 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698