OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TRAY_STATE_CHANGER_WIN_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_TRAY_STATE_CHANGER_WIN_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_TRAY_STATE_CHANGER_WIN_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_TRAY_STATE_CHANGER_WIN_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/threading/non_thread_safe.h" | 10 #include "base/threading/non_thread_safe.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 public: | 56 public: |
57 StatusTrayStateChangerWin(UINT icon_id, HWND window); | 57 StatusTrayStateChangerWin(UINT icon_id, HWND window); |
58 | 58 |
59 // Call this method to move the icon matching |icon_id| and |window| to the | 59 // Call this method to move the icon matching |icon_id| and |window| to the |
60 // taskbar from the overflow area. This will not make any changes if the | 60 // taskbar from the overflow area. This will not make any changes if the |
61 // icon has been set to |PREFERENCE_SHOW_NEVER|, in order to comply with | 61 // icon has been set to |PREFERENCE_SHOW_NEVER|, in order to comply with |
62 // the explicit wishes/configuration of the user. | 62 // the explicit wishes/configuration of the user. |
63 void EnsureTrayIconVisible(); | 63 void EnsureTrayIconVisible(); |
64 | 64 |
65 // IUnknown. | 65 // IUnknown. |
66 virtual ULONG STDMETHODCALLTYPE AddRef() OVERRIDE; | 66 virtual ULONG STDMETHODCALLTYPE AddRef() override; |
67 virtual ULONG STDMETHODCALLTYPE Release() OVERRIDE; | 67 virtual ULONG STDMETHODCALLTYPE Release() override; |
68 virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, PVOID*) OVERRIDE; | 68 virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, PVOID*) override; |
69 | 69 |
70 // INotificationCB. | 70 // INotificationCB. |
71 // Notify is called in response to RegisterCallback for each current | 71 // Notify is called in response to RegisterCallback for each current |
72 // entry in Explorer's list of notification area icons, and ever time | 72 // entry in Explorer's list of notification area icons, and ever time |
73 // one of them changes, until UnregisterCallback is called or |this| | 73 // one of them changes, until UnregisterCallback is called or |this| |
74 // is destroyed. | 74 // is destroyed. |
75 virtual HRESULT STDMETHODCALLTYPE Notify(ULONG, NOTIFYITEM*); | 75 virtual HRESULT STDMETHODCALLTYPE Notify(ULONG, NOTIFYITEM*); |
76 | 76 |
77 protected: | 77 protected: |
78 virtual ~StatusTrayStateChangerWin(); | 78 virtual ~StatusTrayStateChangerWin(); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // TrayNotify->RegisterCallback() | 124 // TrayNotify->RegisterCallback() |
125 // ... other COM stack frames .. | 125 // ... other COM stack frames .. |
126 // StatusTrayStateChangerWin->Notify(NOTIFYITEM); | 126 // StatusTrayStateChangerWin->Notify(NOTIFYITEM); |
127 // so we can't just return the notifyitem we're looking for. | 127 // so we can't just return the notifyitem we're looking for. |
128 scoped_ptr<NOTIFYITEM> notify_item_; | 128 scoped_ptr<NOTIFYITEM> notify_item_; |
129 | 129 |
130 DISALLOW_COPY_AND_ASSIGN(StatusTrayStateChangerWin); | 130 DISALLOW_COPY_AND_ASSIGN(StatusTrayStateChangerWin); |
131 }; | 131 }; |
132 | 132 |
133 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_TRAY_STATE_CHANGER_WIN_H_ | 133 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_TRAY_STATE_CHANGER_WIN_H_ |
OLD | NEW |