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

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

Issue 2461503002: Provide URL-related info to the VR HTML UI. (Closed)
Patch Set: Rebase further ahead to resolve conflict. Created 4 years, 2 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_web_contents_observer.h
diff --git a/chrome/browser/android/vr_shell/vr_web_contents_observer.h b/chrome/browser/android/vr_shell/vr_web_contents_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..b3b404070c58f0c988bd14bf48b71273f8c53bba
--- /dev/null
+++ b/chrome/browser/android/vr_shell/vr_web_contents_observer.h
@@ -0,0 +1,47 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_WEB_CONTENTS_OBSERVER_H_
+#define CHROME_BROWSER_ANDROID_VR_SHELL_VR_WEB_CONTENTS_OBSERVER_H_
+
+#include "base/macros.h"
+#include "content/public/browser/web_contents_observer.h"
+
+namespace content {
+class NavigationHandle;
+}
+
+namespace vr_shell {
+
+class UiInterface;
+
+class CONTENT_EXPORT VrWebContentsObserver
+ : public content::WebContentsObserver {
+ public:
+ VrWebContentsObserver(content::WebContents* web_contents,
+ UiInterface* ui_interface);
+ ~VrWebContentsObserver() override;
+
+ void SetUiInterface(UiInterface* ui_interface);
+
+ // WebContentsObserver implementation.
+ void DidStartLoading() override;
+ void DidStopLoading() override;
+ void DidStartNavigation(
+ content::NavigationHandle* navigation_handle) override;
+ void DidRedirectNavigation(
+ content::NavigationHandle* navigation_handle) override;
+ void DidFinishNavigation(
+ content::NavigationHandle* navigation_handle) override;
+
+ private:
+ // This class does not own the UI interface.
+ UiInterface* ui_interface_;
+
+ DISALLOW_COPY_AND_ASSIGN(VrWebContentsObserver);
+};
+
+} // namespace vr_shell
+
+#endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_WEB_CONTENTS_OBSERVER_H_
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.cc ('k') | chrome/browser/android/vr_shell/vr_web_contents_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698