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

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

Issue 2683823002: Disable DateTime, Color, and Select popups when in VR (Closed)
Patch Set: reformat todo's Created 3 years, 10 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/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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 void WebContentsViewAndroid::ShowPopupMenu( 270 void WebContentsViewAndroid::ShowPopupMenu(
271 RenderFrameHost* render_frame_host, 271 RenderFrameHost* render_frame_host,
272 const gfx::Rect& bounds, 272 const gfx::Rect& bounds,
273 int item_height, 273 int item_height,
274 double item_font_size, 274 double item_font_size,
275 int selected_item, 275 int selected_item,
276 const std::vector<MenuItem>& items, 276 const std::vector<MenuItem>& items,
277 bool right_aligned, 277 bool right_aligned,
278 bool allow_multiple_selection) { 278 bool allow_multiple_selection) {
279 if (web_contents_->GetRenderWidgetHostView()->IsInVR()) {
280 // TODO(billorr): Add VR select popup support. See crbug.com/661243.
281 NOTIMPLEMENTED();
282 return;
283 }
284
279 if (content_view_core_) { 285 if (content_view_core_) {
280 content_view_core_->ShowSelectPopupMenu( 286 content_view_core_->ShowSelectPopupMenu(
281 render_frame_host, bounds, items, selected_item, 287 render_frame_host, bounds, items, selected_item,
282 allow_multiple_selection, right_aligned); 288 allow_multiple_selection, right_aligned);
283 } 289 }
284 } 290 }
285 291
286 void WebContentsViewAndroid::HidePopupMenu() { 292 void WebContentsViewAndroid::HidePopupMenu() {
287 if (content_view_core_) 293 if (content_view_core_)
288 content_view_core_->HideSelectPopupMenu(); 294 content_view_core_->HideSelectPopupMenu();
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 // This is called when we the renderer asks us to take focus back (i.e., it has 394 // This is called when we the renderer asks us to take focus back (i.e., it has
389 // iterated past the last focusable element on the page). 395 // iterated past the last focusable element on the page).
390 void WebContentsViewAndroid::TakeFocus(bool reverse) { 396 void WebContentsViewAndroid::TakeFocus(bool reverse) {
391 if (web_contents_->GetDelegate() && 397 if (web_contents_->GetDelegate() &&
392 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) 398 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse))
393 return; 399 return;
394 web_contents_->GetRenderWidgetHostView()->Focus(); 400 web_contents_->GetRenderWidgetHostView()->Focus();
395 } 401 }
396 402
397 } // namespace content 403 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698