Infobar material design refresh: layout
[chromium-blink-merge.git] / chrome / browser / ui / toolbar / test_toolbar_model.cc
blobdb50507ca86ae9b4b2df88722a35a0851159006c
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
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/toolbar/test_toolbar_model.h"
7 #include "grit/components_scaled_resources.h"
9 TestToolbarModel::TestToolbarModel()
10 : ChromeToolbarModel(),
11 perform_search_term_replacement_(false),
12 security_level_(connection_security::NONE),
13 icon_(IDR_LOCATION_BAR_HTTP),
14 should_display_url_(true) {}
16 TestToolbarModel::~TestToolbarModel() {}
18 base::string16 TestToolbarModel::GetText() const {
19 return text_;
22 base::string16 TestToolbarModel::GetFormattedURL(size_t* prefix_end) const {
23 return text_;
26 base::string16 TestToolbarModel::GetCorpusNameForMobile() const {
27 return base::string16();
30 GURL TestToolbarModel::GetURL() const {
31 return url_;
34 bool TestToolbarModel::WouldPerformSearchTermReplacement(
35 bool ignore_editing) const {
36 return perform_search_term_replacement_;
39 connection_security::SecurityLevel TestToolbarModel::GetSecurityLevel(
40 bool ignore_editing) const {
41 return security_level_;
44 int TestToolbarModel::GetIcon() const {
45 return icon_;
48 base::string16 TestToolbarModel::GetEVCertName() const {
49 return (security_level_ == connection_security::EV_SECURE) ? ev_cert_name_
50 : base::string16();
53 bool TestToolbarModel::ShouldDisplayURL() const {
54 return should_display_url_;