Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
|
bshe
2016/10/27 20:27:44
nit: 2016
| |
| 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 void VrWebContentsObserver::DidStopLoading() { | |
|
mthiesse
2016/10/27 21:31:17
nit: newline here and below.
cjgrant
2016/10/28 14:16:59
Done.
| |
| 27 ui_interface_->SetLoading(false); | |
| 28 } | |
| 29 void VrWebContentsObserver::DidStartNavigation( | |
| 30 content::NavigationHandle* navigation_handle) { | |
| 31 ui_interface_->SetURL(navigation_handle->GetURL()); | |
|
bshe
2016/10/27 20:27:44
Not sure if redirect URL works?
cjgrant
2016/10/28 14:16:59
You were right, this was incomplete. I now cover
bshe
2016/10/28 14:33:14
Do you need to update intermediate urls? It looks
| |
| 32 } | |
| 33 | |
| 34 } // namespace vr_shell | |
| OLD | NEW |