1 // Copyright (c) 2010 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_VIEWS_STATUS_ICONS_STATUS_TRAY_WIN_H_ 6 #define CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_TRAY_WIN_H_ 7 #pragma once 8 9 #include <windows.h> 10 11 #include "chrome/browser/status_icons/status_tray.h" 12 13 class StatusTrayWin : public StatusTray { 14 public: 15 StatusTrayWin(); 16 ~StatusTrayWin(); 17 18 // Exposed for testing. 19 LRESULT CALLBACK WndProc(HWND hwnd, 20 UINT message, 21 WPARAM wparam, 22 LPARAM lparam); 23 protected: 24 // Overriden from StatusTray: 25 virtual StatusIcon* CreatePlatformStatusIcon(); 26 27 private: 28 // Static callback invoked when a message comes in to our messaging window. 29 static LRESULT CALLBACK WndProcStatic(HWND hwnd, 30 UINT message, 31 WPARAM wparam, 32 LPARAM lparam); 33 34 // The unique icon ID we will assign to the next icon. 35 UINT next_icon_id_; 36 37 // The window used for processing events. 38 HWND window_; 39 40 // The message ID of the "TaskbarCreated" message, sent to us when we need to 41 // reset our status icons. 42 UINT taskbar_created_message_; 43 44 DISALLOW_COPY_AND_ASSIGN(StatusTrayWin); 45 }; 46 47 #endif // CHROME_BROWSER_UI_VIEWS_STATUS_ICONS_STATUS_TRAY_WIN_H_ 48 49