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

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

Issue 759063002: Move Screen Rotation from MaximizeModeController to ScreenOrientationController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 "ash/content/display/screen_orientation_delegate_chromeos.h"
7 #include "ash/display/display_controller.h" 8 #include "ash/display/display_controller.h"
8 #include "ash/display/display_manager.h" 9 #include "ash/display/display_manager.h"
9 #include "ash/shell.h" 10 #include "ash/shell.h"
10 #include "ash/system/system_notifier.h" 11 #include "ash/system/system_notifier.h"
11 #include "ash/system/tray/actionable_view.h" 12 #include "ash/system/tray/actionable_view.h"
12 #include "ash/system/tray/fixed_sized_image_view.h" 13 #include "ash/system/tray/fixed_sized_image_view.h"
13 #include "ash/system/tray/system_tray.h" 14 #include "ash/system/tray/system_tray.h"
14 #include "ash/system/tray/system_tray_delegate.h" 15 #include "ash/system/tray/system_tray_delegate.h"
15 #include "ash/system/tray/tray_constants.h" 16 #include "ash/system/tray/tray_constants.h"
16 #include "ash/system/tray/tray_notification_view.h" 17 #include "ash/system/tray/tray_notification_view.h"
17 #include "ash/wm/maximize_mode/maximize_mode_controller.h"
18 #include "base/bind.h" 18 #include "base/bind.h"
19 #include "base/strings/string_util.h" 19 #include "base/strings/string_util.h"
20 #include "base/strings/utf_string_conversions.h" 20 #include "base/strings/utf_string_conversions.h"
21 #include "grit/ash_resources.h" 21 #include "grit/ash_resources.h"
22 #include "grit/ash_strings.h" 22 #include "grit/ash_strings.h"
23 #include "ui/base/l10n/l10n_util.h" 23 #include "ui/base/l10n/l10n_util.h"
24 #include "ui/base/resource/resource_bundle.h" 24 #include "ui/base/resource/resource_bundle.h"
25 #include "ui/message_center/message_center.h" 25 #include "ui/message_center/message_center.h"
26 #include "ui/message_center/notification.h" 26 #include "ui/message_center/notification.h"
27 #include "ui/message_center/notification_delegate.h" 27 #include "ui/message_center/notification_delegate.h"
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 // Always remove the notification to make sure the notification appears 373 // Always remove the notification to make sure the notification appears
374 // as a popup in any situation. 374 // as a popup in any situation.
375 message_center::MessageCenter::Get()->RemoveNotification( 375 message_center::MessageCenter::Get()->RemoveNotification(
376 kNotificationId, false /* by_user */); 376 kNotificationId, false /* by_user */);
377 377
378 if (message.empty()) 378 if (message.empty())
379 return; 379 return;
380 380
381 // Don't display notifications for accelerometer triggered screen rotations. 381 // Don't display notifications for accelerometer triggered screen rotations.
382 // See http://crbug.com/364949 382 // See http://crbug.com/364949
383 if (Shell::GetInstance()->maximize_mode_controller()-> 383 if (Shell::GetInstance()
384 ignore_display_configuration_updates()) { 384 ->screen_orientation_delegate()
385 ->ignore_display_configuration_updates()) {
385 return; 386 return;
386 } 387 }
387 388
388 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 389 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
389 scoped_ptr<Notification> notification(new Notification( 390 scoped_ptr<Notification> notification(new Notification(
390 message_center::NOTIFICATION_TYPE_SIMPLE, 391 message_center::NOTIFICATION_TYPE_SIMPLE,
391 kNotificationId, 392 kNotificationId,
392 message, 393 message,
393 additional_message, 394 additional_message,
394 bundle.GetImageNamed(IDR_AURA_NOTIFICATION_DISPLAY), 395 bundle.GetImageNamed(IDR_AURA_NOTIFICATION_DISPLAY),
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { 442 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) {
442 views::View* view = default_; 443 views::View* view = default_;
443 if (view) { 444 if (view) {
444 view->GetAccessibleState(state); 445 view->GetAccessibleState(state);
445 return true; 446 return true;
446 } 447 }
447 return false; 448 return false;
448 } 449 }
449 450
450 } // namespace ash 451 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698