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

Side by Side Diff: ios/chrome/browser/ui/toolbar/test_toolbar_model_ios.mm

Issue 2606873002: Move the offline URL trimming to GetFormattedURL. (Closed)
Patch Set: fix DEPS Created 3 years, 11 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "ios/chrome/browser/ui/toolbar/test_toolbar_model_ios.h" 5 #include "ios/chrome/browser/ui/toolbar/test_toolbar_model_ios.h"
6 6
7 #include "components/toolbar/toolbar_model_impl.h" 7 #include "components/toolbar/toolbar_model_impl.h"
8 #import "ios/chrome/browser/tabs/tab.h" 8 #import "ios/chrome/browser/tabs/tab.h"
9 9
10 TestToolbarModelIOS::TestToolbarModelIOS() 10 TestToolbarModelIOS::TestToolbarModelIOS()
11 : ToolbarModelIOS(), 11 : ToolbarModelIOS(),
12 is_loading_(FALSE), 12 is_loading_(FALSE),
13 load_progress_fraction_(0.0), 13 load_progress_fraction_(0.0),
14 can_go_back_(FALSE), 14 can_go_back_(FALSE),
15 can_go_forward_(FALSE), 15 can_go_forward_(FALSE),
16 is_current_tab_native_page_(FALSE), 16 is_current_tab_native_page_(FALSE),
17 is_current_tab_bookmarked_(FALSE) { 17 is_current_tab_bookmarked_(FALSE) {
18 test_toolbar_model_.reset(new TestToolbarModel()); 18 test_toolbar_model_.reset(new TestToolbarModel());
19 } 19 }
20 20
21 TestToolbarModelIOS::~TestToolbarModelIOS() {} 21 TestToolbarModelIOS::~TestToolbarModelIOS() {}
22 22
23 ToolbarModel* TestToolbarModelIOS::GetToolbarModel() { 23 TestToolbarModel* TestToolbarModelIOS::GetToolbarModel() {
24 return test_toolbar_model_.get(); 24 return test_toolbar_model_.get();
25 } 25 }
26 26
27 bool TestToolbarModelIOS::IsLoading() { 27 bool TestToolbarModelIOS::IsLoading() {
28 return is_loading_; 28 return is_loading_;
29 } 29 }
30 30
31 CGFloat TestToolbarModelIOS::GetLoadProgressFraction() { 31 CGFloat TestToolbarModelIOS::GetLoadProgressFraction() {
32 return load_progress_fraction_; 32 return load_progress_fraction_;
33 } 33 }
(...skipping 14 matching lines...) Expand all
48 return is_current_tab_bookmarked_; 48 return is_current_tab_bookmarked_;
49 } 49 }
50 50
51 bool TestToolbarModelIOS::IsCurrentTabBookmarkedByUser() { 51 bool TestToolbarModelIOS::IsCurrentTabBookmarkedByUser() {
52 return is_current_tab_bookmarked_; 52 return is_current_tab_bookmarked_;
53 } 53 }
54 54
55 bool TestToolbarModelIOS::ShouldDisplayHintText() { 55 bool TestToolbarModelIOS::ShouldDisplayHintText() {
56 return false; 56 return false;
57 } 57 }
58
59 base::string16 TestToolbarModelIOS::GetFormattedURL(size_t* prefix_end) const {
60 return test_toolbar_model_->GetFormattedURL(prefix_end);
61 }
62
63 GURL TestToolbarModelIOS::GetURL() const {
64 return test_toolbar_model_->GetURL();
65 }
66
67 security_state::SecurityLevel TestToolbarModelIOS::GetSecurityLevel(
68 bool ignore_editing) const {
69 return test_toolbar_model_->GetSecurityLevel(ignore_editing);
70 }
71
72 gfx::VectorIconId TestToolbarModelIOS::GetVectorIcon() const {
73 return test_toolbar_model_->GetVectorIcon();
74 }
75
76 base::string16 TestToolbarModelIOS::GetSecureVerboseText() const {
77 return test_toolbar_model_->GetSecureVerboseText();
78 }
79
80 base::string16 TestToolbarModelIOS::GetEVCertName() const {
81 return test_toolbar_model_->GetEVCertName();
82 }
83
84 bool TestToolbarModelIOS::ShouldDisplayURL() const {
85 return test_toolbar_model_->ShouldDisplayURL();
86 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/toolbar/test_toolbar_model_ios.h ('k') | ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698