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

Side by Side Diff: chrome/browser/ui/toolbar/test_toolbar_model.h

Issue 1539043002: Pull SecurityStateModel out into a component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 #ifndef CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_MODEL_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_MODEL_H_ 6 #define CHROME_BROWSER_UI_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 10 matching lines...) Expand all
21 // should be used only for testing. 21 // should be used only for testing.
22 class TestToolbarModel : public ChromeToolbarModel { 22 class TestToolbarModel : public ChromeToolbarModel {
23 public: 23 public:
24 TestToolbarModel(); 24 TestToolbarModel();
25 ~TestToolbarModel() override; 25 ~TestToolbarModel() override;
26 base::string16 GetText() const override; 26 base::string16 GetText() const override;
27 base::string16 GetFormattedURL(size_t* prefix_end) const override; 27 base::string16 GetFormattedURL(size_t* prefix_end) const override;
28 base::string16 GetCorpusNameForMobile() const override; 28 base::string16 GetCorpusNameForMobile() const override;
29 GURL GetURL() const override; 29 GURL GetURL() const override;
30 bool WouldPerformSearchTermReplacement(bool ignore_editing) const override; 30 bool WouldPerformSearchTermReplacement(bool ignore_editing) const override;
31 SecurityStateModel::SecurityLevel GetSecurityLevel( 31 security_state::SecurityStateModel::SecurityLevel GetSecurityLevel(
32 bool ignore_editing) const override; 32 bool ignore_editing) const override;
33 int GetIcon() const override; 33 int GetIcon() const override;
34 gfx::VectorIconId GetVectorIcon() const override; 34 gfx::VectorIconId GetVectorIcon() const override;
35 base::string16 GetEVCertName() const override; 35 base::string16 GetEVCertName() const override;
36 bool ShouldDisplayURL() const override; 36 bool ShouldDisplayURL() const override;
37 37
38 void set_text(const base::string16& text) { text_ = text; } 38 void set_text(const base::string16& text) { text_ = text; }
39 void set_url(const GURL& url) { url_ = url;} 39 void set_url(const GURL& url) { url_ = url;}
40 void set_perform_search_term_replacement( 40 void set_perform_search_term_replacement(
41 bool perform_search_term_replacement) { 41 bool perform_search_term_replacement) {
42 perform_search_term_replacement_ = perform_search_term_replacement; 42 perform_search_term_replacement_ = perform_search_term_replacement;
43 } 43 }
44 void set_security_level(SecurityStateModel::SecurityLevel security_level) { 44 void set_security_level(
45 security_state::SecurityStateModel::SecurityLevel security_level) {
45 security_level_ = security_level; 46 security_level_ = security_level;
46 } 47 }
47 void set_icon(gfx::VectorIconId icon) { icon_ = icon; } 48 void set_icon(gfx::VectorIconId icon) { icon_ = icon; }
48 void set_ev_cert_name(const base::string16& ev_cert_name) { 49 void set_ev_cert_name(const base::string16& ev_cert_name) {
49 ev_cert_name_ = ev_cert_name; 50 ev_cert_name_ = ev_cert_name;
50 } 51 }
51 void set_should_display_url(bool should_display_url) { 52 void set_should_display_url(bool should_display_url) {
52 should_display_url_ = should_display_url; 53 should_display_url_ = should_display_url;
53 } 54 }
54 55
55 private: 56 private:
56 base::string16 text_; 57 base::string16 text_;
57 GURL url_; 58 GURL url_;
58 bool perform_search_term_replacement_; 59 bool perform_search_term_replacement_;
59 SecurityStateModel::SecurityLevel security_level_; 60 security_state::SecurityStateModel::SecurityLevel security_level_;
60 gfx::VectorIconId icon_; 61 gfx::VectorIconId icon_;
61 base::string16 ev_cert_name_; 62 base::string16 ev_cert_name_;
62 bool should_display_url_; 63 bool should_display_url_;
63 64
64 DISALLOW_COPY_AND_ASSIGN(TestToolbarModel); 65 DISALLOW_COPY_AND_ASSIGN(TestToolbarModel);
65 }; 66 };
66 67
67 #endif // CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_MODEL_H_ 68 #endif // CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/chrome_toolbar_model.h ('k') | chrome/browser/ui/toolbar/test_toolbar_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698