Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Side by Side Diff: chrome/browser/ui/views/status_icons/status_tray_win.cc

Issue 10869037: Implement status tray notifications in Windows 8 metro chrome using metro style notifications. We d… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/views/status_icons/status_tray_win.h" 5 #include "chrome/browser/ui/views/status_icons/status_tray_win.h"
6 6
7 #include "base/win/metro.h"
7 #include "base/win/wrapped_window_proc.h" 8 #include "base/win/wrapped_window_proc.h"
8 #include "chrome/browser/ui/views/status_icons/status_icon_win.h" 9 #include "chrome/browser/ui/views/status_icons/status_icon_win.h"
9 #include "chrome/common/chrome_constants.h" 10 #include "chrome/common/chrome_constants.h"
10 #include "ui/base/win/hwnd_util.h" 11 #include "ui/base/win/hwnd_util.h"
11 #include "ui/gfx/screen.h" 12 #include "ui/gfx/screen.h"
12 13
13 static const UINT kStatusIconMessage = WM_APP + 1; 14 static const UINT kStatusIconMessage = WM_APP + 1;
14 15
15 StatusTrayWin::StatusTrayWin() 16 StatusTrayWin::StatusTrayWin()
16 : next_icon_id_(1), 17 : next_icon_id_(1),
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 91
91 StatusTrayWin::~StatusTrayWin() { 92 StatusTrayWin::~StatusTrayWin() {
92 if (window_) 93 if (window_)
93 DestroyWindow(window_); 94 DestroyWindow(window_);
94 95
95 if (atom_) 96 if (atom_)
96 UnregisterClass(MAKEINTATOM(atom_), instance_); 97 UnregisterClass(MAKEINTATOM(atom_), instance_);
97 } 98 }
98 99
99 StatusIcon* StatusTrayWin::CreatePlatformStatusIcon() { 100 StatusIcon* StatusTrayWin::CreatePlatformStatusIcon() {
100 return new StatusIconWin(next_icon_id_++, window_, kStatusIconMessage); 101 if (base::win::IsMetroProcess()) {
102 return new StatusIconMetro(next_icon_id_++);
103 } else {
104 return new StatusIconWin(next_icon_id_++, window_, kStatusIconMessage);
105 }
101 } 106 }
102 107
103 StatusTray* StatusTray::Create() { 108 StatusTray* StatusTray::Create() {
104 return new StatusTrayWin(); 109 return new StatusTrayWin();
105 } 110 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698