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

Side by Side Diff: chrome/browser/android/vr_shell/ui_elements/content_backplane.cc

Issue 2921383002: [vr] Close exit prompt when clicking on background (Closed)
Patch Set: fix diff Created 3 years, 6 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/android/vr_shell/ui_elements/content_backplane.h"
6
7 #include "base/memory/ptr_util.h"
8
9 namespace vr_shell {
10
11 ContentBackplane::ContentBackplane(const base::Callback<void()>& click_callback)
cjgrant 2017/06/06 19:42:13 Documenting an offline conversation, I think the p
ymalik 2017/06/06 21:11:58 Done. We do need a separate class since UiElement
12 : click_callback_(click_callback) {}
13
14 ContentBackplane::~ContentBackplane() = default;
15
16 void ContentBackplane::OnButtonUp(const gfx::PointF& position) {
17 // We always run the callback. That is, if the user clicks the controller
18 // button on the backplane and releases it on another element in front of the
19 // backplane, this callback will still be called. Elements are input locked
20 // on button down and it's probably not worth special-casing the backplane.
21 click_callback_.Run();
22 }
23
24 } // namespace vr_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698