| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| 11 #include "googleurl/src/gurl.h" |
| 11 #include "third_party/skia/include/core/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
| 12 | 13 |
| 13 // Wraps the state needed by the renderers. | 14 // Wraps the state needed by the renderers. |
| 14 struct TabRendererData { | 15 struct TabRendererData { |
| 15 // Different types of network activity for a tab. The NetworkState of a tab | 16 // Different types of network activity for a tab. The NetworkState of a tab |
| 16 // may be used to alter the UI (e.g. show different kinds of loading | 17 // may be used to alter the UI (e.g. show different kinds of loading |
| 17 // animations). | 18 // animations). |
| 18 enum NetworkState { | 19 enum NetworkState { |
| 19 NETWORK_STATE_NONE, // no network activity. | 20 NETWORK_STATE_NONE, // no network activity. |
| 20 NETWORK_STATE_WAITING, // waiting for a connection. | 21 NETWORK_STATE_WAITING, // waiting for a connection. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 33 crashed_status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION); | 34 crashed_status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION); |
| 34 } | 35 } |
| 35 | 36 |
| 36 // Returns true if the TabRendererData is same as given |data|. Two favicons | 37 // Returns true if the TabRendererData is same as given |data|. Two favicons |
| 37 // are considered equals if two SkBitmaps point to the same SkPixelRef object. | 38 // are considered equals if two SkBitmaps point to the same SkPixelRef object. |
| 38 bool Equals(const TabRendererData& data); | 39 bool Equals(const TabRendererData& data); |
| 39 | 40 |
| 40 SkBitmap favicon; | 41 SkBitmap favicon; |
| 41 NetworkState network_state; | 42 NetworkState network_state; |
| 42 string16 title; | 43 string16 title; |
| 44 GURL url; |
| 43 // Identifies the number of chars at the beginning of the string | 45 // Identifies the number of chars at the beginning of the string |
| 44 // that are common to other tab titles. | 46 // that are common to other tab titles. |
| 45 size_t common_prefix_length; | 47 size_t common_prefix_length; |
| 46 bool loading; | 48 bool loading; |
| 47 base::TerminationStatus crashed_status; | 49 base::TerminationStatus crashed_status; |
| 48 bool incognito; | 50 bool incognito; |
| 49 bool show_icon; | 51 bool show_icon; |
| 50 bool mini; | 52 bool mini; |
| 51 bool blocked; | 53 bool blocked; |
| 52 bool app; | 54 bool app; |
| 53 }; | 55 }; |
| 54 | 56 |
| 55 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_RENDERER_DATA_H_ | 57 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_RENDERER_DATA_H_ |
| OLD | NEW |