OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/android/vr_shell/toolbar_state.h" | 5 #include "chrome/browser/android/vr_shell/toolbar_state.h" |
6 | 6 |
7 namespace vr_shell { | 7 namespace vr_shell { |
8 | 8 |
9 ToolbarState::ToolbarState() | 9 ToolbarState::ToolbarState() |
10 : gurl(GURL()), | 10 : gurl(GURL()), |
11 security_level(security_state::SecurityLevel::NONE), | 11 security_level(security_state::SecurityLevel::NONE), |
12 vector_icon(nullptr), | 12 vector_icon(nullptr), |
13 should_display_url(true) {} | 13 should_display_url(true), |
| 14 offline_page(false) {} |
14 | 15 |
15 ToolbarState::ToolbarState(const GURL& url, | 16 ToolbarState::ToolbarState(const GURL& url, |
16 security_state::SecurityLevel level, | 17 security_state::SecurityLevel level, |
17 const gfx::VectorIcon* icon, | 18 const gfx::VectorIcon* icon, |
18 base::string16 verbose_text, | 19 base::string16 verbose_text, |
19 bool display_url) | 20 bool display_url, |
| 21 bool offline) |
20 : gurl(url), | 22 : gurl(url), |
21 security_level(level), | 23 security_level(level), |
22 vector_icon(icon), | 24 vector_icon(icon), |
23 secure_verbose_text(verbose_text), | 25 secure_verbose_text(verbose_text), |
24 should_display_url(display_url) {} | 26 should_display_url(display_url), |
| 27 offline_page(offline) {} |
| 28 |
| 29 ToolbarState::ToolbarState(const ToolbarState& other) = default; |
25 | 30 |
26 bool ToolbarState::operator==(const ToolbarState& other) const { | 31 bool ToolbarState::operator==(const ToolbarState& other) const { |
27 return (gurl == other.gurl && security_level == other.security_level && | 32 return (gurl == other.gurl && security_level == other.security_level && |
28 vector_icon == other.vector_icon && | 33 vector_icon == other.vector_icon && |
29 should_display_url == other.should_display_url && | 34 should_display_url == other.should_display_url && |
30 secure_verbose_text == other.secure_verbose_text); | 35 secure_verbose_text == other.secure_verbose_text && |
| 36 offline_page == other.offline_page); |
31 } | 37 } |
32 | 38 |
33 bool ToolbarState::operator!=(const ToolbarState& other) const { | 39 bool ToolbarState::operator!=(const ToolbarState& other) const { |
34 return !(*this == other); | 40 return !(*this == other); |
35 } | 41 } |
36 | 42 |
37 } // namespace vr_shell | 43 } // namespace vr_shell |
OLD | NEW |