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

Side by Side Diff: components/toolbar/test_toolbar_model.h

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 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 #ifndef COMPONENTS_TOOLBAR_TEST_TOOLBAR_MODEL_H_ 5 #ifndef COMPONENTS_TOOLBAR_TEST_TOOLBAR_MODEL_H_
6 #define COMPONENTS_TOOLBAR_TEST_TOOLBAR_MODEL_H_ 6 #define COMPONENTS_TOOLBAR_TEST_TOOLBAR_MODEL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 13 matching lines...) Expand all
24 TestToolbarModel(); 24 TestToolbarModel();
25 ~TestToolbarModel() override; 25 ~TestToolbarModel() override;
26 base::string16 GetFormattedURL(size_t* prefix_end) const override; 26 base::string16 GetFormattedURL(size_t* prefix_end) const override;
27 GURL GetURL() const override; 27 GURL GetURL() const override;
28 security_state::SecurityLevel GetSecurityLevel( 28 security_state::SecurityLevel GetSecurityLevel(
29 bool ignore_editing) const override; 29 bool ignore_editing) const override;
30 const gfx::VectorIcon& GetVectorIcon() const override; 30 const gfx::VectorIcon& GetVectorIcon() const override;
31 base::string16 GetSecureVerboseText() const override; 31 base::string16 GetSecureVerboseText() const override;
32 base::string16 GetEVCertName() const override; 32 base::string16 GetEVCertName() const override;
33 bool ShouldDisplayURL() const override; 33 bool ShouldDisplayURL() const override;
34 bool IsOfflinePage() const override;
34 35
35 void set_text(const base::string16& text) { text_ = text; } 36 void set_text(const base::string16& text) { text_ = text; }
36 void set_url(const GURL& url) { url_ = url; } 37 void set_url(const GURL& url) { url_ = url; }
37 void set_security_level(security_state::SecurityLevel security_level) { 38 void set_security_level(security_state::SecurityLevel security_level) {
38 security_level_ = security_level; 39 security_level_ = security_level;
39 } 40 }
40 void set_icon(const gfx::VectorIcon& icon) { icon_ = &icon; } 41 void set_icon(const gfx::VectorIcon& icon) { icon_ = &icon; }
41 void set_ev_cert_name(const base::string16& ev_cert_name) { 42 void set_ev_cert_name(const base::string16& ev_cert_name) {
42 ev_cert_name_ = ev_cert_name; 43 ev_cert_name_ = ev_cert_name;
43 } 44 }
44 void set_should_display_url(bool should_display_url) { 45 void set_should_display_url(bool should_display_url) {
45 should_display_url_ = should_display_url; 46 should_display_url_ = should_display_url;
46 } 47 }
48 void set_offline_page(bool offline_page) { offline_page_ = offline_page; }
47 49
48 private: 50 private:
49 base::string16 text_; 51 base::string16 text_;
50 GURL url_; 52 GURL url_;
51 security_state::SecurityLevel security_level_; 53 security_state::SecurityLevel security_level_ = security_state::NONE;
52 const gfx::VectorIcon* icon_ = nullptr; 54 const gfx::VectorIcon* icon_ = nullptr;
53 base::string16 ev_cert_name_; 55 base::string16 ev_cert_name_;
54 bool should_display_url_; 56 bool should_display_url_ = false;
57 bool offline_page_ = false;
55 58
56 DISALLOW_COPY_AND_ASSIGN(TestToolbarModel); 59 DISALLOW_COPY_AND_ASSIGN(TestToolbarModel);
57 }; 60 };
58 61
59 #endif // COMPONENTS_TOOLBAR_TEST_TOOLBAR_MODEL_H_ 62 #endif // COMPONENTS_TOOLBAR_TEST_TOOLBAR_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.cc ('k') | components/toolbar/test_toolbar_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698