Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3485)

Unified Diff: chrome/browser/ui/gtk/browser_titlebar_throbber.h

Issue 10483010: Change the visual appearance of panel on GTK per new UI design. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/gtk/browser_titlebar_throbber.h
diff --git a/chrome/browser/ui/gtk/browser_titlebar_throbber.h b/chrome/browser/ui/gtk/browser_titlebar_throbber.h
new file mode 100644
index 0000000000000000000000000000000000000000..b1c55b10ac4f51eba63bc7f8b8c7cee97c8e02a9
--- /dev/null
+++ b/chrome/browser/ui/gtk/browser_titlebar_throbber.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_THROBBER_H_
+#define CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_THROBBER_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "ui/gfx/gtk_util.h"
+
+// A helper class to keep track of which frame of the throbber animation
+// we're showing.
+class BrowserTitlebarThrobber {
+ public:
+ BrowserTitlebarThrobber();
+
+ // Get the next frame in the animation. The image is owned by the throbber
+ // 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.
+ // still waiting for a response.
+ GdkPixbuf* GetNextFrame(bool is_waiting);
+
+ // Reset back to the first frame.
+ void Reset();
+
+ private:
+ // Make sure the frames are loaded.
+ static void InitFrames();
+
+ int current_frame_;
+ int current_waiting_frame_;
+
+ DISALLOW_COPY_AND_ASSIGN(BrowserTitlebarThrobber);
+};
+
+#endif // CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_THROBBER_H_

Powered by Google App Engine
This is Rietveld 408576698