OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_SIDEBAR_SIDEBAR_TAB_RENDERER_DATA_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_SIDEBAR_SIDEBAR_TAB_RENDERER_DATA_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/string16.h" |
| 10 #include "third_party/skia/include/core/SkBitmap.h" |
| 11 |
| 12 // Wraps the state needed to render the sidebar mini tab. |
| 13 struct SidebarTabRendererData { |
| 14 // Different types of network activity for a sidebar contents corresponding |
| 15 // to this tab. The NetworkState of a tab contents may be used to alter the UI |
| 16 // (e.g. show different kinds of loading animations). |
| 17 enum NetworkState { |
| 18 NETWORK_STATE_NONE, // no network activity. |
| 19 NETWORK_STATE_WAITING, // waiting for a connection. |
| 20 NETWORK_STATE_LOADING, // connected, transferring data. |
| 21 }; |
| 22 |
| 23 SidebarTabRendererData() |
| 24 : network_state(NETWORK_STATE_NONE), |
| 25 crashed(false) { |
| 26 } |
| 27 |
| 28 // Cached sidebar properties. |
| 29 SkBitmap icon; |
| 30 string16 title; |
| 31 string16 badge_text; |
| 32 // Sidebar's contents network state. |
| 33 NetworkState network_state; |
| 34 // Whether the sidebar's contents renderer crashed or not. |
| 35 bool crashed; |
| 36 }; |
| 37 |
| 38 #endif // CHROME_BROWSER_UI_VIEWS_SIDEBAR_SIDEBAR_TAB_RENDERER_DATA_H_ |
| 39 |
OLD | NEW |