Home | History | Annotate | Download | only in toolbar
      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.
      4 
      5 #include "chrome/browser/ui/toolbar/test_toolbar_model.h"
      6 
      7 #include "grit/theme_resources.h"
      8 
      9 TestToolbarModel::TestToolbarModel()
     10     : ToolbarModel(),
     11       should_replace_url_(false),
     12       security_level_(NONE),
     13       icon_(IDR_LOCATION_BAR_HTTP),
     14       should_display_url_(true),
     15       input_in_progress_(false) {}
     16 
     17 TestToolbarModel::~TestToolbarModel() {}
     18 
     19 string16 TestToolbarModel::GetText(
     20     bool display_search_urls_as_search_terms) const {
     21   return text_;
     22 }
     23 
     24 string16 TestToolbarModel::GetCorpusNameForMobile() const {
     25   return string16();
     26 }
     27 
     28 GURL TestToolbarModel::GetURL() const {
     29   return url_;
     30 }
     31 
     32 bool TestToolbarModel::WouldReplaceSearchURLWithSearchTerms(
     33     bool ignore_editing) const {
     34   return should_replace_url_;
     35 }
     36 
     37 ToolbarModel::SecurityLevel TestToolbarModel::GetSecurityLevel(
     38     bool ignore_editing) const {
     39   return security_level_;
     40 }
     41 
     42 int TestToolbarModel::GetIcon() const {
     43   return icon_;
     44 }
     45 
     46 string16 TestToolbarModel::GetEVCertName() const {
     47   return ev_cert_name_;
     48 }
     49 
     50 bool TestToolbarModel::ShouldDisplayURL() const {
     51   return should_display_url_;
     52 }
     53 
     54 void TestToolbarModel::SetInputInProgress(bool value) {
     55   input_in_progress_ = value;
     56 }
     57 
     58 bool TestToolbarModel::GetInputInProgress() const {
     59   return input_in_progress_;
     60 }
     61