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 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_RENDERER_DATA_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_RENDERER_DATA_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_RENDERER_DATA_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_RENDERER_DATA_H_ |
7 | 7 |
8 #include "base/process_util.h" | 8 #include "base/process_util.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 }; | 22 }; |
23 | 23 |
24 // Capture state of this tab. If a WebRTC media stream is active, then it is | 24 // Capture state of this tab. If a WebRTC media stream is active, then it is |
25 // recording. If tab capturing is active then it is projecting. | 25 // recording. If tab capturing is active then it is projecting. |
26 enum CaptureState { | 26 enum CaptureState { |
27 CAPTURE_STATE_NONE, | 27 CAPTURE_STATE_NONE, |
28 CAPTURE_STATE_RECORDING, | 28 CAPTURE_STATE_RECORDING, |
29 CAPTURE_STATE_PROJECTING | 29 CAPTURE_STATE_PROJECTING |
30 }; | 30 }; |
31 | 31 |
32 // Audio playing state of this tab. If muting is added this is where it | |
33 // should go. | |
34 enum AudioState { | |
35 AUDIO_STATE_NONE, | |
36 AUDIO_STATE_PLAYING | |
37 }; | |
38 | |
39 TabRendererData(); | 32 TabRendererData(); |
40 ~TabRendererData(); | 33 ~TabRendererData(); |
41 | 34 |
42 // This interprets the crashed status to decide whether or not this | 35 // This interprets the crashed status to decide whether or not this |
43 // render data represents a tab that is "crashed" (i.e. the render | 36 // render data represents a tab that is "crashed" (i.e. the render |
44 // process died unexpectedly). | 37 // process died unexpectedly). |
45 bool IsCrashed() const { | 38 bool IsCrashed() const { |
46 return (crashed_status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED || | 39 return (crashed_status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED || |
47 crashed_status == base::TERMINATION_STATUS_PROCESS_CRASHED || | 40 crashed_status == base::TERMINATION_STATUS_PROCESS_CRASHED || |
48 crashed_status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION); | 41 crashed_status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION); |
49 } | 42 } |
50 | 43 |
51 // Returns true if the TabRendererData is same as given |data|. | 44 // Returns true if the TabRendererData is same as given |data|. |
52 bool Equals(const TabRendererData& data); | 45 bool Equals(const TabRendererData& data); |
53 | 46 |
54 gfx::ImageSkia favicon; | 47 gfx::ImageSkia favicon; |
55 NetworkState network_state; | 48 NetworkState network_state; |
56 string16 title; | 49 string16 title; |
57 GURL url; | 50 GURL url; |
58 bool loading; | 51 bool loading; |
59 base::TerminationStatus crashed_status; | 52 base::TerminationStatus crashed_status; |
60 bool incognito; | 53 bool incognito; |
61 bool show_icon; | 54 bool show_icon; |
62 bool mini; | 55 bool mini; |
63 bool blocked; | 56 bool blocked; |
64 bool app; | 57 bool app; |
65 CaptureState capture_state; | 58 CaptureState capture_state; |
66 AudioState audio_state; | |
67 }; | 59 }; |
68 | 60 |
69 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_RENDERER_DATA_H_ | 61 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_RENDERER_DATA_H_ |
OLD | NEW |