| OLD | NEW |
| 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/wm/workspace/workspace_layout_manager.h" | 5 #include "ash/wm/workspace/workspace_layout_manager.h" |
| 6 | 6 |
| 7 #include "ash/display/display_layout.h" | 7 #include "ash/display/display_layout.h" |
| 8 #include "ash/display/display_manager.h" | 8 #include "ash/display/display_manager.h" |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/screen_ash.h" | 10 #include "ash/screen_ash.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 class MaximizeDelegateView : public views::WidgetDelegateView { | 28 class MaximizeDelegateView : public views::WidgetDelegateView { |
| 29 public: | 29 public: |
| 30 MaximizeDelegateView(const gfx::Rect& initial_bounds) | 30 MaximizeDelegateView(const gfx::Rect& initial_bounds) |
| 31 : initial_bounds_(initial_bounds) { | 31 : initial_bounds_(initial_bounds) { |
| 32 } | 32 } |
| 33 virtual ~MaximizeDelegateView() {} | 33 virtual ~MaximizeDelegateView() {} |
| 34 | 34 |
| 35 virtual bool GetSavedWindowPlacement( | 35 virtual bool GetSavedWindowPlacement( |
| 36 const views::Widget* widget, |
| 36 gfx::Rect* bounds, | 37 gfx::Rect* bounds, |
| 37 ui::WindowShowState* show_state) const OVERRIDE { | 38 ui::WindowShowState* show_state) const OVERRIDE { |
| 38 *bounds = initial_bounds_; | 39 *bounds = initial_bounds_; |
| 39 *show_state = ui::SHOW_STATE_MAXIMIZED; | 40 *show_state = ui::SHOW_STATE_MAXIMIZED; |
| 40 return true; | 41 return true; |
| 41 } | 42 } |
| 42 | 43 |
| 43 private: | 44 private: |
| 44 const gfx::Rect initial_bounds_; | 45 const gfx::Rect initial_bounds_; |
| 45 | 46 |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 window->bounds().ToString()); | 401 window->bounds().ToString()); |
| 401 | 402 |
| 402 // Directly setting the bounds triggers a slightly different code path. Verify | 403 // Directly setting the bounds triggers a slightly different code path. Verify |
| 403 // that too. | 404 // that too. |
| 404 window->SetBounds(window_bounds); | 405 window->SetBounds(window_bounds); |
| 405 EXPECT_EQ(gfx::Rect(gfx::Point(100, 101), work_area).ToString(), | 406 EXPECT_EQ(gfx::Rect(gfx::Point(100, 101), work_area).ToString(), |
| 406 window->bounds().ToString()); | 407 window->bounds().ToString()); |
| 407 } | 408 } |
| 408 | 409 |
| 409 } // namespace ash | 410 } // namespace ash |
| OLD | NEW |