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

Side by Side Diff: ash/system/chromeos/tray_display.cc

Issue 1292003004: Elide origins displayed on web notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Style nit Created 5 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
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 "ash/system/chromeos/tray_display.h" 5 #include "ash/system/chromeos/tray_display.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/content/display/screen_orientation_controller_chromeos.h" 9 #include "ash/content/display/screen_orientation_controller_chromeos.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 // Don't display notifications for accelerometer triggered screen rotations. 384 // Don't display notifications for accelerometer triggered screen rotations.
385 // See http://crbug.com/364949 385 // See http://crbug.com/364949
386 if (Shell::GetInstance() 386 if (Shell::GetInstance()
387 ->screen_orientation_controller() 387 ->screen_orientation_controller()
388 ->ignore_display_configuration_updates()) { 388 ->ignore_display_configuration_updates()) {
389 return; 389 return;
390 } 390 }
391 391
392 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 392 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
393 scoped_ptr<Notification> notification(new Notification( 393 scoped_ptr<Notification> notification(new Notification(
394 message_center::NOTIFICATION_TYPE_SIMPLE, 394 message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId, message,
395 kNotificationId, 395 additional_message, bundle.GetImageNamed(IDR_AURA_NOTIFICATION_DISPLAY),
396 message,
397 additional_message,
398 bundle.GetImageNamed(IDR_AURA_NOTIFICATION_DISPLAY),
399 base::string16(), // display_source 396 base::string16(), // display_source
400 message_center::NotifierId( 397 GURL(),
401 message_center::NotifierId::SYSTEM_COMPONENT, 398 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
402 system_notifier::kNotifierDisplay), 399 system_notifier::kNotifierDisplay),
403 message_center::RichNotificationData(), 400 message_center::RichNotificationData(),
404 new message_center::HandleNotificationClickedDelegate( 401 new message_center::HandleNotificationClickedDelegate(
405 base::Bind(&OpenSettings)))); 402 base::Bind(&OpenSettings))));
406 403
407 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); 404 message_center::MessageCenter::Get()->AddNotification(notification.Pass());
408 } 405 }
409 406
410 views::View* TrayDisplay::CreateDefaultView(user::LoginStatus status) { 407 views::View* TrayDisplay::CreateDefaultView(user::LoginStatus status) {
411 DCHECK(default_ == NULL); 408 DCHECK(default_ == NULL);
412 default_ = new DisplayView(); 409 default_ = new DisplayView();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { 442 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) {
446 views::View* view = default_; 443 views::View* view = default_;
447 if (view) { 444 if (view) {
448 view->GetAccessibleState(state); 445 view->GetAccessibleState(state);
449 return true; 446 return true;
450 } 447 }
451 return false; 448 return false;
452 } 449 }
453 450
454 } // namespace ash 451 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/session/tray_session_length_limit.cc ('k') | ash/system/locale/locale_notification_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698