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

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

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 2 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
« no previous file with comments | « ui/message_center/views/message_popup_collection.h ('k') | ui/ozone/demo/software_renderer.h » ('j') | 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/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 : parent_(parent), 55 : parent_(parent),
56 message_center_(message_center), 56 message_center_(message_center),
57 tray_(tray), 57 tray_(tray),
58 alignment_delegate_(alignment_delegate), 58 alignment_delegate_(alignment_delegate),
59 defer_counter_(0), 59 defer_counter_(0),
60 latest_toast_entered_(NULL), 60 latest_toast_entered_(NULL),
61 user_is_closing_toasts_by_clicking_(false), 61 user_is_closing_toasts_by_clicking_(false),
62 context_menu_controller_(new MessageViewContextMenuController(this)), 62 context_menu_controller_(new MessageViewContextMenuController(this)),
63 weak_factory_(this) { 63 weak_factory_(this) {
64 DCHECK(message_center_); 64 DCHECK(message_center_);
65 defer_timer_.reset(new base::OneShotTimer<MessagePopupCollection>); 65 defer_timer_.reset(new base::OneShotTimer);
66 message_center_->AddObserver(this); 66 message_center_->AddObserver(this);
67 alignment_delegate_->set_collection(this); 67 alignment_delegate_->set_collection(this);
68 } 68 }
69 69
70 MessagePopupCollection::~MessagePopupCollection() { 70 MessagePopupCollection::~MessagePopupCollection() {
71 weak_factory_.InvalidateWeakPtrs(); 71 weak_factory_.InvalidateWeakPtrs();
72 72
73 message_center_->RemoveObserver(this); 73 message_center_->RemoveObserver(this);
74 74
75 CloseAllWidgets(); 75 CloseAllWidgets();
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 views::Widget* widget = (*iter)->GetWidget(); 504 views::Widget* widget = (*iter)->GetWidget();
505 if (widget) 505 if (widget)
506 return widget->GetWindowBoundsInScreen(); 506 return widget->GetWindowBoundsInScreen();
507 break; 507 break;
508 } 508 }
509 } 509 }
510 return gfx::Rect(); 510 return gfx::Rect();
511 } 511 }
512 512
513 } // namespace message_center 513 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/message_popup_collection.h ('k') | ui/ozone/demo/software_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698