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

Side by Side Diff: ash/extended_desktop_unittest.cc

Issue 1819533002: Convert ScopedVector<DisplayPlacement> to std::vector<DisplayPlacement> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@jsonrefactor
Patch Set: Created 4 years, 9 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 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/display/display_manager.h" 5 #include "ash/display/display_manager.h"
6 #include "ash/root_window_controller.h" 6 #include "ash/root_window_controller.h"
7 #include "ash/screen_util.h" 7 #include "ash/screen_util.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/system/tray/system_tray.h" 10 #include "ash/system/tray/system_tray.h"
(...skipping 18 matching lines...) Expand all
29 #include "ui/views/widget/widget.h" 29 #include "ui/views/widget/widget.h"
30 #include "ui/views/widget/widget_delegate.h" 30 #include "ui/views/widget/widget_delegate.h"
31 #include "ui/wm/public/activation_client.h" 31 #include "ui/wm/public/activation_client.h"
32 32
33 namespace ash { 33 namespace ash {
34 namespace { 34 namespace {
35 35
36 void SetSecondaryDisplayLayout(DisplayPlacement::Position position) { 36 void SetSecondaryDisplayLayout(DisplayPlacement::Position position) {
37 scoped_ptr<DisplayLayout> layout = 37 scoped_ptr<DisplayLayout> layout =
38 Shell::GetInstance()->display_manager()->GetCurrentDisplayLayout().Copy(); 38 Shell::GetInstance()->display_manager()->GetCurrentDisplayLayout().Copy();
39 layout->placement_list[0]->position = position; 39 layout->placement_list[0].position = position;
40 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( 40 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays(
41 std::move(layout)); 41 std::move(layout));
42 } 42 }
43 43
44 class ModalWidgetDelegate : public views::WidgetDelegateView { 44 class ModalWidgetDelegate : public views::WidgetDelegateView {
45 public: 45 public:
46 ModalWidgetDelegate() {} 46 ModalWidgetDelegate() {}
47 ~ModalWidgetDelegate() override {} 47 ~ModalWidgetDelegate() override {}
48 48
49 // Overridden from views::WidgetDelegate: 49 // Overridden from views::WidgetDelegate:
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 generator.ReleaseLeftButton(); 928 generator.ReleaseLeftButton();
929 EXPECT_EQ("-999,-999 -999,-999", event_handler.GetLocationsAndReset()); 929 EXPECT_EQ("-999,-999 -999,-999", event_handler.GetLocationsAndReset());
930 930
931 generator.MoveMouseTo(400, 150); 931 generator.MoveMouseTo(400, 150);
932 EXPECT_EQ("100,150 100,150", event_handler.GetLocationsAndReset()); 932 EXPECT_EQ("100,150 100,150", event_handler.GetLocationsAndReset());
933 933
934 ash::Shell::GetInstance()->RemovePreTargetHandler(&event_handler); 934 ash::Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
935 } 935 }
936 936
937 } // namespace ash 937 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/window_tree_host_manager_unittest.cc ('k') | chrome/browser/chromeos/display/display_preferences_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698