Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_THROBBER_H_ | |
| 6 #define CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_THROBBER_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/basictypes.h" | |
| 10 #include "base/compiler_specific.h" | |
| 11 #include "ui/gfx/gtk_util.h" | |
| 12 | |
| 13 // A helper class to keep track of which frame of the throbber animation | |
| 14 // we're showing. | |
| 15 class BrowserTitlebarThrobber { | |
| 16 public: | |
| 17 BrowserTitlebarThrobber(); | |
| 18 | |
| 19 // Get the next frame in the animation. The image is owned by the throbber | |
| 20 // so the caller doesn't need to unref. |is_waiting| is true if we're | |
|
Evan Stade
2012/06/04 22:58:19
nit: one space after .
jianli
2012/06/05 18:48:30
Done.
| |
| 21 // still waiting for a response. | |
| 22 GdkPixbuf* GetNextFrame(bool is_waiting); | |
| 23 | |
| 24 // Reset back to the first frame. | |
| 25 void Reset(); | |
| 26 | |
| 27 private: | |
| 28 // Make sure the frames are loaded. | |
| 29 static void InitFrames(); | |
| 30 | |
| 31 int current_frame_; | |
| 32 int current_waiting_frame_; | |
| 33 | |
| 34 DISALLOW_COPY_AND_ASSIGN(BrowserTitlebarThrobber); | |
| 35 }; | |
| 36 | |
| 37 #endif // CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_THROBBER_H_ | |
| OLD | NEW |