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

Unified Diff: chrome/browser/android/vr_shell/vr_shell.h

Issue 2960903002: VR: Use ToolbarModel to drive VR URL bar state. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/vr_shell/vr_shell.h
diff --git a/chrome/browser/android/vr_shell/vr_shell.h b/chrome/browser/android/vr_shell/vr_shell.h
index c675a3711612010d59dc1aea95a6ae8331089c1a..14fbd87857e06d5b695a79f6ea9943426de523dd 100644
--- a/chrome/browser/android/vr_shell/vr_shell.h
+++ b/chrome/browser/android/vr_shell/vr_shell.h
@@ -17,6 +17,7 @@
#include "chrome/browser/android/vr_shell/ui_interface.h"
#include "chrome/browser/android/vr_shell/ui_unsupported_mode.h"
#include "chrome/browser/android/vr_shell/vr_controller_model.h"
+#include "chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h"
#include "content/public/browser/web_contents_observer.h"
#include "device/vr/android/gvr/cardboard_gamepad_data_provider.h"
#include "device/vr/android/gvr/gvr_delegate.h"
@@ -39,6 +40,7 @@ class WindowAndroid;
namespace vr_shell {
class AndroidUiGestureTarget;
+class ToolbarHelper;
class UiInterface;
class VrCompositor;
class VrGLThread;
@@ -62,7 +64,8 @@ class VrMetricsHelper;
// must only be used on the UI thread.
class VrShell : public device::GvrDelegate,
device::GvrGamepadDataProvider,
- device::CardboardGamepadDataProvider {
+ device::CardboardGamepadDataProvider,
+ public ChromeToolbarModelDelegate {
public:
VrShell(JNIEnv* env,
jobject obj,
@@ -173,6 +176,9 @@ class VrShell : public device::GvrDelegate,
void RegisterCardboardGamepadDataFetcher(
device::CardboardGamepadDataFetcher*) override;
+ // ChromeToolbarModelDelegate implementation.
+ content::WebContents* GetActiveWebContents() const override;
+
private:
~VrShell() override;
void WaitForGlThread();
@@ -219,9 +225,11 @@ class VrShell : public device::GvrDelegate,
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
std::unique_ptr<VrGLThread> gl_thread_;
bool thread_started_ = false;
- UiInterface* ui_;
bool reprojected_rendering_;
+ UiInterface* ui_;
+ std::unique_ptr<ToolbarHelper> toolbar_;
+
jobject content_surface_ = nullptr;
bool taken_surface_ = false;
base::CancelableClosure poll_capturing_media_task_;

Powered by Google App Engine
This is Rietveld 408576698