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

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

Issue 11773042: Allow embedders to provide a custom view for popup (select box) widgets, (Closed) Base URL: http://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 months 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/logging.h" 7 #include "base/logging.h"
8 #include "content/browser/android/content_view_core_impl.h" 8 #include "content/browser/android/content_view_core_impl.h"
9 #include "content/browser/android/media_player_manager_android.h" 9 #include "content/browser/android/media_player_manager_android.h"
10 #include "content/browser/renderer_host/render_widget_host_view_android.h" 10 #include "content/browser/renderer_host/render_widget_host_view_android.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // |native_view_|, this has no effect without also instructing the 73 // |native_view_|, this has no effect without also instructing the
74 // native view (i.e. ContentView) how to obtain a reference to this widget in 74 // native view (i.e. ContentView) how to obtain a reference to this widget in
75 // order to paint it. See ContentView::GetRenderWidgetHostViewAndroid for an 75 // order to paint it. See ContentView::GetRenderWidgetHostViewAndroid for an
76 // example of how this is achieved for InterstitialPages. 76 // example of how this is achieved for InterstitialPages.
77 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(render_widget_host); 77 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(render_widget_host);
78 RenderWidgetHostView* view = new RenderWidgetHostViewAndroid( 78 RenderWidgetHostView* view = new RenderWidgetHostViewAndroid(
79 rwhi, content_view_core_); 79 rwhi, content_view_core_);
80 return view; 80 return view;
81 } 81 }
82 82
83 RenderWidgetHostView* WebContentsViewAndroid::CreateViewForPopupWidget(
84 RenderWidgetHost* render_widget_host) {
85 return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host);
86 }
87
83 gfx::NativeView WebContentsViewAndroid::GetNativeView() const { 88 gfx::NativeView WebContentsViewAndroid::GetNativeView() const {
84 return content_view_core_; 89 return content_view_core_;
85 } 90 }
86 91
87 gfx::NativeView WebContentsViewAndroid::GetContentNativeView() const { 92 gfx::NativeView WebContentsViewAndroid::GetContentNativeView() const {
88 return content_view_core_; 93 return content_view_core_;
89 } 94 }
90 95
91 gfx::NativeWindow WebContentsViewAndroid::GetTopLevelNativeWindow() const { 96 gfx::NativeWindow WebContentsViewAndroid::GetTopLevelNativeWindow() const {
92 return content_view_core_->GetWindowAndroid(); 97 return content_view_core_->GetWindowAndroid();
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // This is called when we the renderer asks us to take focus back (i.e., it has 214 // This is called when we the renderer asks us to take focus back (i.e., it has
210 // iterated past the last focusable element on the page). 215 // iterated past the last focusable element on the page).
211 void WebContentsViewAndroid::TakeFocus(bool reverse) { 216 void WebContentsViewAndroid::TakeFocus(bool reverse) {
212 if (web_contents_->GetDelegate() && 217 if (web_contents_->GetDelegate() &&
213 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) 218 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse))
214 return; 219 return;
215 web_contents_->GetRenderWidgetHostView()->Focus(); 220 web_contents_->GetRenderWidgetHostView()->Focus();
216 } 221 }
217 222
218 } // namespace content 223 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_android.h ('k') | content/browser/web_contents/web_contents_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698