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

Side by Side Diff: ui/message_center/views/message_popup_collection.cc

Issue 13861029: Changing type of a widget for notification popups, to remove them from Win taskbar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "ui/message_center/views/message_popup_collection.h" 5 #include "ui/message_center/views/message_popup_collection.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 26 matching lines...) Expand all
37 set_background(views::Background::CreateSolidBackground(0, 0, 0, 0)); 37 set_background(views::Background::CreateSolidBackground(0, 0, 0, 0));
38 38
39 int seconds = kAutocloseDefaultDelaySeconds; 39 int seconds = kAutocloseDefaultDelaySeconds;
40 if (notification->priority() > DEFAULT_PRIORITY) 40 if (notification->priority() > DEFAULT_PRIORITY)
41 seconds = kAutocloseHighPriorityDelaySeconds; 41 seconds = kAutocloseHighPriorityDelaySeconds;
42 delay_ = base::TimeDelta::FromSeconds(seconds); 42 delay_ = base::TimeDelta::FromSeconds(seconds);
43 } 43 }
44 44
45 views::Widget* CreateWidget(gfx::NativeView parent) { 45 views::Widget* CreateWidget(gfx::NativeView parent) {
46 views::Widget::InitParams params( 46 views::Widget::InitParams params(
47 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 47 views::Widget::InitParams::TYPE_POPUP);
48 params.keep_on_top = true; 48 params.keep_on_top = true;
49 if (parent) 49 if (parent)
50 params.parent = parent; 50 params.parent = parent;
51 else 51 else
52 params.top_level = true; 52 params.top_level = true;
53 params.transparent = true; 53 params.transparent = true;
54 params.delegate = this; 54 params.delegate = this;
55 views::Widget* widget = new views::Widget(); 55 views::Widget* widget = new views::Widget();
56 widget->set_focus_on_creation(false); 56 widget->set_focus_on_creation(false);
57 widget->Init(params); 57 widget->Init(params);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 message_center_->notification_list()->MarkSinglePopupAsShown( 272 message_center_->notification_list()->MarkSinglePopupAsShown(
273 iter->first, false); 273 iter->first, false);
274 toasts_.erase(iter); 274 toasts_.erase(iter);
275 break; 275 break;
276 } 276 }
277 } 277 }
278 UpdatePopups(); 278 UpdatePopups();
279 } 279 }
280 280
281 } // namespace message_center 281 } // namespace message_center
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698