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 |
32 TabRendererData(); | 39 TabRendererData(); |
33 ~TabRendererData(); | 40 ~TabRendererData(); |
34 | 41 |
35 // This interprets the crashed status to decide whether or not this | 42 // This interprets the crashed status to decide whether or not this |
36 // render data represents a tab that is "crashed" (i.e. the render | 43 // render data represents a tab that is "crashed" (i.e. the render |
37 // process died unexpectedly). | 44 // process died unexpectedly). |
38 bool IsCrashed() const { | 45 bool IsCrashed() const { |
39 return (crashed_status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED || | 46 return (crashed_status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED || |
40 crashed_status == base::TERMINATION_STATUS_PROCESS_CRASHED || | 47 crashed_status == base::TERMINATION_STATUS_PROCESS_CRASHED || |
41 crashed_status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION); | 48 crashed_status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION); |
42 } | 49 } |
43 | 50 |
44 // Returns true if the TabRendererData is same as given |data|. | 51 // Returns true if the TabRendererData is same as given |data|. |
45 bool Equals(const TabRendererData& data); | 52 bool Equals(const TabRendererData& data); |
46 | 53 |
47 gfx::ImageSkia favicon; | 54 gfx::ImageSkia favicon; |
48 NetworkState network_state; | 55 NetworkState network_state; |
49 string16 title; | 56 string16 title; |
50 GURL url; | 57 GURL url; |
51 bool loading; | 58 bool loading; |
52 base::TerminationStatus crashed_status; | 59 base::TerminationStatus crashed_status; |
53 bool incognito; | 60 bool incognito; |
54 bool show_icon; | 61 bool show_icon; |
55 bool mini; | 62 bool mini; |
56 bool blocked; | 63 bool blocked; |
57 bool app; | 64 bool app; |
58 CaptureState capture_state; | 65 CaptureState capture_state; |
| 66 AudioState audio_state; |
59 }; | 67 }; |
60 | 68 |
61 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_RENDERER_DATA_H_ | 69 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_RENDERER_DATA_H_ |
OLD | NEW |