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

Unified Diff: ash/common/wm/window_positioning_utils.cc

Issue 2162193003: Separates out accelerators using non-common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@accelerators
Patch Set: sim=20 Created 4 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/common/wm/window_positioning_utils.h ('k') | ash/display/display_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/window_positioning_utils.cc
diff --git a/ash/common/wm/window_positioning_utils.cc b/ash/common/wm/window_positioning_utils.cc
index 61dbf8f333268eef944b5ee0b02826b846d336a6..37d36061ba0f62b06aad2a20d8ec9acd0eb6699c 100644
--- a/ash/common/wm/window_positioning_utils.cc
+++ b/ash/common/wm/window_positioning_utils.cc
@@ -6,6 +6,8 @@
#include <algorithm>
+#include "ash/common/wm/window_state.h"
+#include "ash/common/wm/wm_event.h"
#include "ash/common/wm/wm_screen_util.h"
#include "ash/common/wm_window.h"
#include "ui/gfx/geometry/rect.h"
@@ -77,5 +79,10 @@ gfx::Rect GetDefaultRightSnappedWindowBoundsInParent(WmWindow* window) {
width, work_area_in_parent.height());
}
+void CenterWindow(WmWindow* window) {
+ WMEvent event(WM_EVENT_CENTER);
+ window->GetWindowState()->OnWMEvent(&event);
+}
+
} // namespace wm
} // namespace ash
« no previous file with comments | « ash/common/wm/window_positioning_utils.h ('k') | ash/display/display_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698