| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/panels/panel_window_resizer.h" | 5 #include "ash/wm/panels/panel_window_resizer.h" |
| 6 | 6 |
| 7 #include "ash/public/cpp/config.h" | 7 #include "ash/public/cpp/config.h" |
| 8 #include "ash/public/cpp/shelf_types.h" | 8 #include "ash/public/cpp/shelf_types.h" |
| 9 #include "ash/public/cpp/shell_window_ids.h" | 9 #include "ash/public/cpp/shell_window_ids.h" |
| 10 #include "ash/public/cpp/window_properties.h" | 10 #include "ash/public/cpp/window_properties.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 return location; | 57 return location; |
| 58 } | 58 } |
| 59 | 59 |
| 60 aura::Window* CreatePanelWindow(const gfx::Point& origin) { | 60 aura::Window* CreatePanelWindow(const gfx::Point& origin) { |
| 61 gfx::Rect bounds(origin, gfx::Size(101, 101)); | 61 gfx::Rect bounds(origin, gfx::Size(101, 101)); |
| 62 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( | 62 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( |
| 63 NULL, aura::client::WINDOW_TYPE_PANEL, 0, bounds); | 63 NULL, aura::client::WINDOW_TYPE_PANEL, 0, bounds); |
| 64 static int id = 0; | 64 static int id = 0; |
| 65 std::string shelf_id(ash::ShelfID(base::IntToString(id++)).Serialize()); | 65 std::string shelf_id(ash::ShelfID(base::IntToString(id++)).Serialize()); |
| 66 window->SetProperty(kShelfIDKey, new std::string(shelf_id)); | 66 window->SetProperty(kShelfIDKey, new std::string(shelf_id)); |
| 67 window->SetProperty<int>(kShelfItemTypeKey, TYPE_APP_PANEL); |
| 67 shelf_view_test_->RunMessageLoopUntilAnimationsDone(); | 68 shelf_view_test_->RunMessageLoopUntilAnimationsDone(); |
| 68 return window; | 69 return window; |
| 69 } | 70 } |
| 70 | 71 |
| 71 void DragStart(aura::Window* window) { | 72 void DragStart(aura::Window* window) { |
| 72 resizer_ = CreateWindowResizer(window, window->bounds().origin(), HTCAPTION, | 73 resizer_ = CreateWindowResizer(window, window->bounds().origin(), HTCAPTION, |
| 73 ::wm::WINDOW_MOVE_SOURCE_MOUSE); | 74 ::wm::WINDOW_MOVE_SOURCE_MOUSE); |
| 74 } | 75 } |
| 75 | 76 |
| 76 void DragMove(int dx, int dy) { | 77 void DragMove(int dx, int dy) { |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 | 557 |
| 557 INSTANTIATE_TEST_CASE_P(LtrRtl, | 558 INSTANTIATE_TEST_CASE_P(LtrRtl, |
| 558 PanelWindowResizerTextDirectionTest, | 559 PanelWindowResizerTextDirectionTest, |
| 559 testing::Bool()); | 560 testing::Bool()); |
| 560 INSTANTIATE_TEST_CASE_P(NormalPanelPopup, | 561 INSTANTIATE_TEST_CASE_P(NormalPanelPopup, |
| 561 PanelWindowResizerTransientTest, | 562 PanelWindowResizerTransientTest, |
| 562 testing::Values(aura::client::WINDOW_TYPE_NORMAL, | 563 testing::Values(aura::client::WINDOW_TYPE_NORMAL, |
| 563 aura::client::WINDOW_TYPE_POPUP)); | 564 aura::client::WINDOW_TYPE_POPUP)); |
| 564 | 565 |
| 565 } // namespace ash | 566 } // namespace ash |
| OLD | NEW |