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
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/views/tabs/tab_renderer_data.h"
7 #include "base/process/kill.h"
9 TabRendererData::TabRendererData()
10 : network_state(NETWORK_STATE_NONE
),
12 crashed_status(base::TERMINATION_STATUS_STILL_RUNNING
),
18 media_state(TAB_MEDIA_STATE_NONE
) {
21 TabRendererData::~TabRendererData() {}
23 bool TabRendererData::IsCrashed() const {
24 return (crashed_status
== base::TERMINATION_STATUS_PROCESS_WAS_KILLED
||
25 #if defined(OS_CHROMEOS)
27 base::TERMINATION_STATUS_PROCESS_WAS_KILLED_BY_OOM
||
29 crashed_status
== base::TERMINATION_STATUS_PROCESS_CRASHED
||
30 crashed_status
== base::TERMINATION_STATUS_ABNORMAL_TERMINATION
||
31 crashed_status
== base::TERMINATION_STATUS_LAUNCH_FAILED
);
34 bool TabRendererData::Equals(const TabRendererData
& data
) {
36 favicon
.BackedBySameObjectAs(data
.favicon
) &&
37 network_state
== data
.network_state
&&
38 title
== data
.title
&&
40 loading
== data
.loading
&&
41 crashed_status
== data
.crashed_status
&&
42 incognito
== data
.incognito
&&
43 show_icon
== data
.show_icon
&&
44 pinned
== data
.pinned
&&
45 blocked
== data
.blocked
&&
47 media_state
== data
.media_state
;