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

Side by Side Diff: chrome/browser/ui/gtk/unity_dock_service.h

Issue 6903017: GTK: Add download notifications to the unity dock. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/launcher/dock/; Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_GTK_UNITY_DOCK_SERVICE_H_
6 #define CHROME_BROWSER_UI_GTK_UNITY_DOCK_SERVICE_H_
7
8 #include "chrome/browser/ui/gtk/dock_service.h"
9
10 #include <gtk/gtk.h>
11
12 // Unity data typedefs.
13 typedef struct _UnityLauncherEntry UnityLauncherEntry;
14 typedef UnityLauncherEntry* (*unity_launcher_entry_get_for_desktop_id_func)
15 (const gchar* desktop_id);
16 typedef void (*unity_launcher_entry_set_count_func)(UnityLauncherEntry* self,
17 gint64 value);
18 typedef void (*unity_launcher_entry_set_count_visible_func)
19 (UnityLauncherEntry* self, gboolean value);
20 typedef void (*unity_launcher_entry_set_progress_func)(UnityLauncherEntry* self,
21 gdouble value);
22 typedef void (*unity_launcher_entry_set_progress_visible_func)
23 (UnityLauncherEntry* self, gboolean value);
24
25 class UnityDockService : public DockService {
26 public:
27 // Possibly sets the download counter in the dock icon. Any value other than
28 // 0 displays the badge.
29 virtual void SetDownloadCount(int count);
30
31 // Possibly sets the download progress bar in the dock icon. Any value less
32 // than 1.0 shows the progress bar.
33 virtual void SetProgressPercent(float percentage);
34
35 protected:
36 friend class DockService;
37
38 UnityDockService();
39 virtual ~UnityDockService();
40
41 // Real constructor. Returns NULL on error.
42 static DockService* Build();
43
44 // A link to the desktop entry in the panel.
45 UnityLauncherEntry* chrome_entry;
46
47 // Retrieved functions from libunity.
48 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
49 unity_launcher_entry_set_count_visible_func entry_set_count_visible;
50 unity_launcher_entry_set_progress_func entry_set_progress;
51 unity_launcher_entry_set_progress_visible_func entry_set_progress_visible;
52 };
53
54 #endif // CHROME_BROWSER_UI_GTK_UNITY_DOCK_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698