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

Unified Diff: ash/display/resolution_notification_controller.h

Issue 417113012: Introduce user customization of external HighDPI mode for 4K monitor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/display/display_manager_unittest.cc ('k') | ash/display/resolution_notification_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/resolution_notification_controller.h
diff --git a/ash/display/resolution_notification_controller.h b/ash/display/resolution_notification_controller.h
index 9fe402650177143a4d426275679adaafadcb51ea..e4c20e8e8f9b23a4c143423f7a5a2ce17084eeb5 100644
--- a/ash/display/resolution_notification_controller.h
+++ b/ash/display/resolution_notification_controller.h
@@ -24,6 +24,8 @@ class Widget;
namespace ash {
+struct DisplayMode;
+
// A class which manages the notification of display resolution change and
// also manages the timeout in case the new resolution is unusable.
class ASH_EXPORT ResolutionNotificationController
@@ -33,17 +35,22 @@ class ASH_EXPORT ResolutionNotificationController
ResolutionNotificationController();
virtual ~ResolutionNotificationController();
- // Updates the display resolution for |display_id| to |new_resolution| and
- // creates a notification for this change which offers a button to revert the
+ // Prepare a resolution change notification for |display_id| from
+ // |old_resolution| to |new_resolution|, which offers a button to revert the
// change in case something goes wrong. The notification times out if there's
// only one display connected and the user is trying to modify its resolution.
// In that case, the timeout has to be set since the user cannot make any
// changes if something goes wrong.
- void SetDisplayResolutionAndNotify(
- int64 display_id,
- const gfx::Size& old_resolution,
- const gfx::Size& new_resolution,
- const base::Closure& accept_callback);
+ //
+ // This method does not create a notification itself. The notification will be
+ // created the next OnDisplayConfigurationChanged(), which will be called
+ // asynchronously after the resolution change is requested. So typically this
+ // method will be combined with resolution change methods like
+ // DisplayManager::SetDisplayMode().
+ void PrepareNotification(int64 display_id,
+ const DisplayMode& old_resolution,
+ const DisplayMode& new_resolution,
+ const base::Closure& accept_callback);
// Returns true if the notification is visible or scheduled to be visible and
// the notification times out.
« no previous file with comments | « ash/display/display_manager_unittest.cc ('k') | ash/display/resolution_notification_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698