| OLD | NEW |
| 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 "chrome/browser/ui/toolbar/test_toolbar_model.h" | 5 #include "chrome/browser/ui/toolbar/test_toolbar_model.h" |
| 6 | 6 |
| 7 #include "grit/components_scaled_resources.h" | 7 #include "grit/components_scaled_resources.h" |
| 8 #include "ui/gfx/vector_icons_public.h" |
| 8 | 9 |
| 9 TestToolbarModel::TestToolbarModel() | 10 TestToolbarModel::TestToolbarModel() |
| 10 : ChromeToolbarModel(), | 11 : ChromeToolbarModel(), |
| 11 perform_search_term_replacement_(false), | 12 perform_search_term_replacement_(false), |
| 12 security_level_(SecurityStateModel::NONE), | 13 security_level_(SecurityStateModel::NONE), |
| 13 icon_(IDR_LOCATION_BAR_HTTP), | 14 icon_(IDR_LOCATION_BAR_HTTP), |
| 14 should_display_url_(true) {} | 15 should_display_url_(true) {} |
| 15 | 16 |
| 16 TestToolbarModel::~TestToolbarModel() {} | 17 TestToolbarModel::~TestToolbarModel() {} |
| 17 | 18 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 38 | 39 |
| 39 SecurityStateModel::SecurityLevel TestToolbarModel::GetSecurityLevel( | 40 SecurityStateModel::SecurityLevel TestToolbarModel::GetSecurityLevel( |
| 40 bool ignore_editing) const { | 41 bool ignore_editing) const { |
| 41 return security_level_; | 42 return security_level_; |
| 42 } | 43 } |
| 43 | 44 |
| 44 int TestToolbarModel::GetIcon() const { | 45 int TestToolbarModel::GetIcon() const { |
| 45 return icon_; | 46 return icon_; |
| 46 } | 47 } |
| 47 | 48 |
| 49 gfx::VectorIconId TestToolbarModel::GetVectorIcon() const { |
| 50 return gfx::VectorIconId::VECTOR_ICON_NONE; |
| 51 } |
| 52 |
| 48 base::string16 TestToolbarModel::GetEVCertName() const { | 53 base::string16 TestToolbarModel::GetEVCertName() const { |
| 49 return (security_level_ == SecurityStateModel::EV_SECURE) ? ev_cert_name_ | 54 return (security_level_ == SecurityStateModel::EV_SECURE) ? ev_cert_name_ |
| 50 : base::string16(); | 55 : base::string16(); |
| 51 } | 56 } |
| 52 | 57 |
| 53 bool TestToolbarModel::ShouldDisplayURL() const { | 58 bool TestToolbarModel::ShouldDisplayURL() const { |
| 54 return should_display_url_; | 59 return should_display_url_; |
| 55 } | 60 } |
| OLD | NEW |