OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/libgtk2ui/unity_service.h" | 5 #include "chrome/browser/ui/libgtk2ui/unity_service.h" |
6 | 6 |
7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/environment.h" | 13 #include "base/environment.h" |
14 #include "base/nix/xdg_util.h" | 14 #include "base/nix/xdg_util.h" |
15 #include "chrome/browser/shell_integration_linux.h" | |
16 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h" | 15 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h" |
17 | 16 |
18 // Unity data typedefs. | 17 // Unity data typedefs. |
19 typedef struct _UnityInspector UnityInspector; | 18 typedef struct _UnityInspector UnityInspector; |
20 typedef UnityInspector* (*unity_inspector_get_default_func)(void); | 19 typedef UnityInspector* (*unity_inspector_get_default_func)(void); |
21 typedef gboolean (*unity_inspector_get_unity_running_func) | 20 typedef gboolean (*unity_inspector_get_unity_running_func) |
22 (UnityInspector* self); | 21 (UnityInspector* self); |
23 | 22 |
24 typedef struct _UnityLauncherEntry UnityLauncherEntry; | 23 typedef struct _UnityLauncherEntry UnityLauncherEntry; |
25 typedef UnityLauncherEntry* (*unity_launcher_entry_get_for_desktop_id_func) | 24 typedef UnityLauncherEntry* (*unity_launcher_entry_get_for_desktop_id_func) |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 void SetProgressFraction(float percentage) { | 137 void SetProgressFraction(float percentage) { |
139 EnsureMethodsLoaded(); | 138 EnsureMethodsLoaded(); |
140 if (chrome_entry && entry_set_progress && entry_set_progress_visible) { | 139 if (chrome_entry && entry_set_progress && entry_set_progress_visible) { |
141 entry_set_progress(chrome_entry, percentage); | 140 entry_set_progress(chrome_entry, percentage); |
142 entry_set_progress_visible(chrome_entry, | 141 entry_set_progress_visible(chrome_entry, |
143 percentage > 0.0 && percentage < 1.0); | 142 percentage > 0.0 && percentage < 1.0); |
144 } | 143 } |
145 } | 144 } |
146 | 145 |
147 } // namespace unity | 146 } // namespace unity |
OLD | NEW |