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

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

Issue 2965043003: ToolbarModel: Supply offline page status. (Closed)
Patch Set: And, ios-simulator. Created 3 years, 5 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/vr_shell/toolbar_helper.h" 5 #include "chrome/browser/android/vr_shell/toolbar_helper.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "components/toolbar/toolbar_model_impl.h" 8 #include "components/toolbar/toolbar_model_impl.h"
9 9
10 class ToolbarModelDelegate; 10 class ToolbarModelDelegate;
(...skipping 12 matching lines...) Expand all
23 : ui_(ui), 23 : ui_(ui),
24 toolbar_model_( 24 toolbar_model_(
25 base::MakeUnique<ToolbarModelImpl>(delegate, kMaxURLDisplayChars)) {} 25 base::MakeUnique<ToolbarModelImpl>(delegate, kMaxURLDisplayChars)) {}
26 26
27 ToolbarHelper::~ToolbarHelper() {} 27 ToolbarHelper::~ToolbarHelper() {}
28 28
29 void ToolbarHelper::Update() { 29 void ToolbarHelper::Update() {
30 ToolbarState state( 30 ToolbarState state(
31 toolbar_model_->GetURL(), toolbar_model_->GetSecurityLevel(true), 31 toolbar_model_->GetURL(), toolbar_model_->GetSecurityLevel(true),
32 &toolbar_model_->GetVectorIcon(), toolbar_model_->GetSecureVerboseText(), 32 &toolbar_model_->GetVectorIcon(), toolbar_model_->GetSecureVerboseText(),
33 toolbar_model_->ShouldDisplayURL()); 33 toolbar_model_->ShouldDisplayURL(), toolbar_model_->IsOfflinePage());
34 34
35 if (current_state_ == state) 35 if (current_state_ == state)
36 return; 36 return;
37 current_state_ = state; 37 current_state_ = state;
38 ui_->SetToolbarState(state); 38 ui_->SetToolbarState(state);
39 } 39 }
40 40
41 } // namespace vr_shell 41 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/textures/url_bar_texture_unittest.cc ('k') | chrome/browser/android/vr_shell/toolbar_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698