Chromium Code Reviews| Index: chrome/browser/ui/gtk/unity_dock_service.h |
| diff --git a/chrome/browser/ui/gtk/unity_dock_service.h b/chrome/browser/ui/gtk/unity_dock_service.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d1d37ea31ac2a6af45c8611a643128831ca60261 |
| --- /dev/null |
| +++ b/chrome/browser/ui/gtk/unity_dock_service.h |
| @@ -0,0 +1,54 @@ |
| +// Copyright (c) 2011 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_UNITY_DOCK_SERVICE_H_ |
| +#define CHROME_BROWSER_UI_GTK_UNITY_DOCK_SERVICE_H_ |
| + |
| +#include "chrome/browser/ui/gtk/dock_service.h" |
| + |
| +#include <gtk/gtk.h> |
| + |
| +// Unity data typedefs. |
| +typedef struct _UnityLauncherEntry UnityLauncherEntry; |
| +typedef UnityLauncherEntry* (*unity_launcher_entry_get_for_desktop_id_func) |
| + (const gchar* desktop_id); |
| +typedef void (*unity_launcher_entry_set_count_func)(UnityLauncherEntry* self, |
| + gint64 value); |
| +typedef void (*unity_launcher_entry_set_count_visible_func) |
| + (UnityLauncherEntry* self, gboolean value); |
| +typedef void (*unity_launcher_entry_set_progress_func)(UnityLauncherEntry* self, |
| + gdouble value); |
| +typedef void (*unity_launcher_entry_set_progress_visible_func) |
| + (UnityLauncherEntry* self, gboolean value); |
| + |
| +class UnityDockService : public DockService { |
| + public: |
| + // Possibly sets the download counter in the dock icon. Any value other than |
| + // 0 displays the badge. |
| + virtual void SetDownloadCount(int count); |
| + |
| + // Possibly sets the download progress bar in the dock icon. Any value less |
| + // than 1.0 shows the progress bar. |
| + virtual void SetProgressPercent(float percentage); |
| + |
| + protected: |
| + friend class DockService; |
| + |
| + UnityDockService(); |
| + virtual ~UnityDockService(); |
| + |
| + // Real constructor. Returns NULL on error. |
| + static DockService* Build(); |
| + |
| + // A link to the desktop entry in the panel. |
| + UnityLauncherEntry* chrome_entry; |
| + |
| + // Retrieved functions from libunity. |
| + unity_launcher_entry_set_count_func entry_set_count; |
|
Evan Martin
2011/04/26 00:33:52
I feel like these are statics. I feel like they s
|
| + unity_launcher_entry_set_count_visible_func entry_set_count_visible; |
| + unity_launcher_entry_set_progress_func entry_set_progress; |
| + unity_launcher_entry_set_progress_visible_func entry_set_progress_visible; |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_GTK_UNITY_DOCK_SERVICE_H_ |