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

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

Issue 2685283002: Add UpdateNotificationSize to MessageCenterController. (Closed)
Patch Set: whitespace Created 3 years, 10 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
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/toast_contents_view.h" 5 #include "ui/message_center/views/toast_contents_view.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 if (collection_) 320 if (collection_)
321 collection_->ClickOnNotification(notification_id); 321 collection_->ClickOnNotification(notification_id);
322 } 322 }
323 323
324 void ToastContentsView::ClickOnSettingsButton( 324 void ToastContentsView::ClickOnSettingsButton(
325 const std::string& notification_id) { 325 const std::string& notification_id) {
326 if (collection_) 326 if (collection_)
327 collection_->ClickOnSettingsButton(notification_id); 327 collection_->ClickOnSettingsButton(notification_id);
328 } 328 }
329 329
330 void ToastContentsView::ShouldUpdateNotification(
331 const std::string& notification_id) {
332 UpdatePreferredSize();
333 }
334
330 void ToastContentsView::RemoveNotification( 335 void ToastContentsView::RemoveNotification(
331 const std::string& notification_id, 336 const std::string& notification_id,
332 bool by_user) { 337 bool by_user) {
333 if (collection_) 338 if (collection_)
334 collection_->RemoveNotification(notification_id, by_user); 339 collection_->RemoveNotification(notification_id, by_user);
335 } 340 }
336 341
337 std::unique_ptr<ui::MenuModel> ToastContentsView::CreateMenuModel( 342 std::unique_ptr<ui::MenuModel> ToastContentsView::CreateMenuModel(
338 const NotifierId& notifier_id, 343 const NotifierId& notifier_id,
339 const base::string16& display_source) { 344 const base::string16& display_source) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 } 388 }
384 389
385 gfx::Rect ToastContentsView::GetClosedToastBounds(gfx::Rect bounds) { 390 gfx::Rect ToastContentsView::GetClosedToastBounds(gfx::Rect bounds) {
386 return gfx::Rect(bounds.x() + bounds.width() - kClosedToastWidth, 391 return gfx::Rect(bounds.x() + bounds.width() - kClosedToastWidth,
387 bounds.y(), 392 bounds.y(),
388 kClosedToastWidth, 393 kClosedToastWidth,
389 bounds.height()); 394 bounds.height());
390 } 395 }
391 396
392 } // namespace message_center 397 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698