OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/views/tabs/tab_renderer_data.h" | 5 #include "chrome/browser/ui/views/tabs/tab_renderer_data.h" |
6 | 6 |
7 #include "base/process/kill.h" | 7 #include "base/process/kill.h" |
8 | 8 |
9 TabRendererData::TabRendererData() | 9 TabRendererData::TabRendererData() |
10 : network_state(NETWORK_STATE_NONE), | 10 : network_state(NETWORK_STATE_NONE), |
11 loading(false), | 11 loading(false), |
12 crashed_status(base::TERMINATION_STATUS_STILL_RUNNING), | 12 crashed_status(base::TERMINATION_STATUS_STILL_RUNNING), |
13 incognito(false), | 13 incognito(false), |
14 show_icon(true), | 14 show_icon(true), |
15 pinned(false), | 15 pinned(false), |
16 blocked(false), | 16 blocked(false), |
17 app(false), | 17 app(false), |
18 media_state(TAB_MEDIA_STATE_NONE) { | 18 media_state(TAB_MEDIA_STATE_NONE) { |
19 } | 19 } |
20 | 20 |
21 TabRendererData::~TabRendererData() {} | 21 TabRendererData::~TabRendererData() {} |
22 | 22 |
23 bool TabRendererData::IsCrashed() const { | 23 bool TabRendererData::IsCrashed() const { |
24 return (crashed_status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED || | 24 return (crashed_status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED || |
25 #if defined(OS_CHROMEOS) | 25 #if defined(OS_CHROMEOS) |
26 crashed_status == | 26 crashed_status == |
27 base::TERMINATION_STATUS_PROCESS_WAS_KILLED_BY_OOM || | 27 base::TERMINATION_STATUS_PROCESS_WAS_KILLED_BY_OOM || |
28 #endif | 28 #endif |
29 crashed_status == base::TERMINATION_STATUS_PROCESS_CRASHED || | 29 crashed_status == base::TERMINATION_STATUS_PROCESS_CRASHED || |
30 crashed_status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION); | 30 crashed_status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION || |
| 31 crashed_status == base::TERMINATION_STATUS_LAUNCH_FAILED); |
31 } | 32 } |
32 | 33 |
33 bool TabRendererData::Equals(const TabRendererData& data) { | 34 bool TabRendererData::Equals(const TabRendererData& data) { |
34 return | 35 return |
35 favicon.BackedBySameObjectAs(data.favicon) && | 36 favicon.BackedBySameObjectAs(data.favicon) && |
36 network_state == data.network_state && | 37 network_state == data.network_state && |
37 title == data.title && | 38 title == data.title && |
38 url == data.url && | 39 url == data.url && |
39 loading == data.loading && | 40 loading == data.loading && |
40 crashed_status == data.crashed_status && | 41 crashed_status == data.crashed_status && |
41 incognito == data.incognito && | 42 incognito == data.incognito && |
42 show_icon == data.show_icon && | 43 show_icon == data.show_icon && |
43 pinned == data.pinned && | 44 pinned == data.pinned && |
44 blocked == data.blocked && | 45 blocked == data.blocked && |
45 app == data.app && | 46 app == data.app && |
46 media_state == data.media_state; | 47 media_state == data.media_state; |
47 } | 48 } |
OLD | NEW |