| 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 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_APP_INDICATOR_ICON_H_ | 5 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_APP_INDICATOR_ICON_H_ |
| 6 #define CHROME_BROWSER_UI_LIBGTK2UI_APP_INDICATOR_ICON_H_ | 6 #define CHROME_BROWSER_UI_LIBGTK2UI_APP_INDICATOR_ICON_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 9 #include "base/macros.h" | 11 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 12 #include "base/nix/xdg_util.h" | 13 #include "base/nix/xdg_util.h" |
| 13 #include "chrome/browser/ui/libgtk2ui/gtk2_signal.h" | 14 #include "chrome/browser/ui/libgtk2ui/gtk2_signal.h" |
| 14 #include "ui/views/linux_ui/status_icon_linux.h" | 15 #include "ui/views/linux_ui/status_icon_linux.h" |
| 15 | 16 |
| 16 typedef struct _AppIndicator AppIndicator; | 17 typedef struct _AppIndicator AppIndicator; |
| 17 typedef struct _GtkWidget GtkWidget; | 18 typedef struct _GtkWidget GtkWidget; |
| 18 | 19 |
| 19 class SkBitmap; | 20 class SkBitmap; |
| 20 | 21 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 87 |
| 87 std::string id_; | 88 std::string id_; |
| 88 std::string tool_tip_; | 89 std::string tool_tip_; |
| 89 | 90 |
| 90 // Used to select KDE or Unity for image setting. | 91 // Used to select KDE or Unity for image setting. |
| 91 base::nix::DesktopEnvironment desktop_env_; | 92 base::nix::DesktopEnvironment desktop_env_; |
| 92 | 93 |
| 93 // Gtk status icon wrapper | 94 // Gtk status icon wrapper |
| 94 AppIndicator* icon_; | 95 AppIndicator* icon_; |
| 95 | 96 |
| 96 scoped_ptr<AppIndicatorIconMenu> menu_; | 97 std::unique_ptr<AppIndicatorIconMenu> menu_; |
| 97 ui::MenuModel* menu_model_; | 98 ui::MenuModel* menu_model_; |
| 98 | 99 |
| 99 base::FilePath temp_dir_; | 100 base::FilePath temp_dir_; |
| 100 int icon_change_count_; | 101 int icon_change_count_; |
| 101 | 102 |
| 102 base::WeakPtrFactory<AppIndicatorIcon> weak_factory_; | 103 base::WeakPtrFactory<AppIndicatorIcon> weak_factory_; |
| 103 | 104 |
| 104 DISALLOW_COPY_AND_ASSIGN(AppIndicatorIcon); | 105 DISALLOW_COPY_AND_ASSIGN(AppIndicatorIcon); |
| 105 }; | 106 }; |
| 106 | 107 |
| 107 } // namespace libgtk2ui | 108 } // namespace libgtk2ui |
| 108 | 109 |
| 109 #endif // CHROME_BROWSER_UI_LIBGTK2UI_APP_INDICATOR_ICON_H_ | 110 #endif // CHROME_BROWSER_UI_LIBGTK2UI_APP_INDICATOR_ICON_H_ |
| OLD | NEW |