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

Side by Side Diff: chrome/browser/android/vr_shell/vr_web_contents_observer.cc

Issue 2461503002: Provide URL-related info to the VR HTML UI. (Closed)
Patch Set: Rebase further ahead to resolve conflict. Created 4 years, 1 month 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
« no previous file with comments | « chrome/browser/android/vr_shell/vr_web_contents_observer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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/vr_web_contents_observer.h"
6
7 #include "chrome/browser/android/vr_shell/ui_interface.h"
8 #include "content/public/browser/navigation_handle.h"
9
10 namespace vr_shell {
11
12 VrWebContentsObserver::VrWebContentsObserver(content::WebContents* web_contents,
13 UiInterface* ui_interface)
14 : WebContentsObserver(web_contents),
15 ui_interface_(ui_interface) {}
16
17 VrWebContentsObserver::~VrWebContentsObserver() {}
18
19 void VrWebContentsObserver::SetUiInterface(UiInterface* ui_interface) {
20 ui_interface_ = ui_interface;
21 }
22
23 void VrWebContentsObserver::DidStartLoading() {
24 ui_interface_->SetLoading(true);
25 }
26
27 void VrWebContentsObserver::DidStopLoading() {
28 ui_interface_->SetLoading(false);
29 }
30
31 void VrWebContentsObserver::DidStartNavigation(
32 content::NavigationHandle* navigation_handle) {
33 ui_interface_->SetURL(navigation_handle->GetURL());
34 }
35
36 void VrWebContentsObserver::DidRedirectNavigation(
37 content::NavigationHandle* navigation_handle) {
38 ui_interface_->SetURL(navigation_handle->GetURL());
39 }
40
41 void VrWebContentsObserver::DidFinishNavigation(
42 content::NavigationHandle* navigation_handle) {
43 ui_interface_->SetURL(navigation_handle->GetURL());
44 }
45
46 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_web_contents_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698