Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_VIEWS_STATUS_ICONS_STATUS_ICON_WIN_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_WIN_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_WIN_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #include <shellapi.h> | 10 #include <shellapi.h> |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 37 UINT message_id() const { return message_id_; } | 37 UINT message_id() const { return message_id_; } |
| 38 | 38 |
| 39 // Handles a click event from the user - if |left_button_click| is true and | 39 // Handles a click event from the user - if |left_button_click| is true and |
| 40 // there is a registered observer, passes the click event to the observer, | 40 // there is a registered observer, passes the click event to the observer, |
| 41 // otherwise displays the context menu if there is one. | 41 // otherwise displays the context menu if there is one. |
| 42 void HandleClickEvent(int x, int y, bool left_button_click); | 42 void HandleClickEvent(int x, int y, bool left_button_click); |
| 43 | 43 |
| 44 // Re-creates the status tray icon now after the taskbar has been created. | 44 // Re-creates the status tray icon now after the taskbar has been created. |
| 45 void ResetIcon(); | 45 void ResetIcon(); |
| 46 | 46 |
| 47 // Forces to hide the notification balloon if any. | |
| 48 void HideBalloon(); | |
|
Andrew T Wilson (Slow)
2011/10/26 01:05:01
Not sure that this should be public?
Leandro GraciĆ” Gil
2011/10/26 12:13:26
Addressed in the next patch.
On 2011/10/26 01:05:
| |
| 49 | |
| 47 protected: | 50 protected: |
| 48 // Overridden from StatusIcon. | 51 // Overridden from StatusIcon. |
| 49 virtual void UpdatePlatformContextMenu(ui::MenuModel* menu); | 52 virtual void UpdatePlatformContextMenu(ui::MenuModel* menu); |
| 50 | 53 |
| 51 private: | 54 private: |
| 52 void InitIconData(NOTIFYICONDATA* icon_data); | 55 void InitIconData(NOTIFYICONDATA* icon_data); |
| 53 | 56 |
| 54 // The unique ID corresponding to this icon. | 57 // The unique ID corresponding to this icon. |
| 55 UINT icon_id_; | 58 UINT icon_id_; |
| 56 | 59 |
| 57 // Window used for processing messages from this icon. | 60 // Window used for processing messages from this icon. |
| 58 HWND window_; | 61 HWND window_; |
| 59 | 62 |
| 60 // The message identifier used for status icon messages. | 63 // The message identifier used for status icon messages. |
| 61 UINT message_id_; | 64 UINT message_id_; |
| 62 | 65 |
| 63 // The currently-displayed icon for the window. | 66 // The currently-displayed icon for the window. |
| 64 base::win::ScopedHICON icon_; | 67 base::win::ScopedHICON icon_; |
| 65 | 68 |
| 69 // The currently-displayed icon for the notification balloon. | |
| 70 base::win::ScopedHICON balloon_icon_; | |
| 71 | |
| 66 #if !defined(USE_AURA) | 72 #if !defined(USE_AURA) |
| 67 // Context menu associated with this icon (if any). | 73 // Context menu associated with this icon (if any). |
| 68 scoped_ptr<views::Menu2> context_menu_; | 74 scoped_ptr<views::Menu2> context_menu_; |
| 69 #endif | 75 #endif |
| 70 | 76 |
| 71 DISALLOW_COPY_AND_ASSIGN(StatusIconWin); | 77 DISALLOW_COPY_AND_ASSIGN(StatusIconWin); |
| 72 }; | 78 }; |
| 73 | 79 |
| 74 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_WIN_H_ | 80 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_ICON_WIN_H_ |
| OLD | NEW |