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

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

Issue 231953003: Show Ash like <select> popup on Android tablets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@newpopupx
Patch Set: Introduce DropdownPopupWindow Created 6 years, 8 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/frame_host/interstitial_page_impl.h" 9 #include "content/browser/frame_host/interstitial_page_impl.h"
10 #include "content/browser/media/android/browser_media_player_manager.h" 10 #include "content/browser/media/android/browser_media_player_manager.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 void WebContentsViewAndroid::ShowPopupMenu( 178 void WebContentsViewAndroid::ShowPopupMenu(
179 const gfx::Rect& bounds, 179 const gfx::Rect& bounds,
180 int item_height, 180 int item_height,
181 double item_font_size, 181 double item_font_size,
182 int selected_item, 182 int selected_item,
183 const std::vector<MenuItem>& items, 183 const std::vector<MenuItem>& items,
184 bool right_aligned, 184 bool right_aligned,
185 bool allow_multiple_selection) { 185 bool allow_multiple_selection) {
186 if (content_view_core_) { 186 if (content_view_core_) {
187 content_view_core_->ShowSelectPopupMenu( 187 content_view_core_->ShowSelectPopupMenu(
188 items, selected_item, allow_multiple_selection); 188 bounds, items, selected_item, allow_multiple_selection);
189 } 189 }
190 } 190 }
191 191
192 void WebContentsViewAndroid::HidePopupMenu() { 192 void WebContentsViewAndroid::HidePopupMenu() {
193 if (content_view_core_) 193 if (content_view_core_)
194 content_view_core_->HideSelectPopupMenu(); 194 content_view_core_->HideSelectPopupMenu();
195 } 195 }
196 196
197 void WebContentsViewAndroid::StartDragging( 197 void WebContentsViewAndroid::StartDragging(
198 const DropData& drop_data, 198 const DropData& drop_data,
(...skipping 16 matching lines...) Expand all
215 // This is called when we the renderer asks us to take focus back (i.e., it has 215 // This is called when we the renderer asks us to take focus back (i.e., it has
216 // iterated past the last focusable element on the page). 216 // iterated past the last focusable element on the page).
217 void WebContentsViewAndroid::TakeFocus(bool reverse) { 217 void WebContentsViewAndroid::TakeFocus(bool reverse) {
218 if (web_contents_->GetDelegate() && 218 if (web_contents_->GetDelegate() &&
219 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) 219 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse))
220 return; 220 return;
221 web_contents_->GetRenderWidgetHostView()->Focus(); 221 web_contents_->GetRenderWidgetHostView()->Focus();
222 } 222 }
223 223
224 } // namespace content 224 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698