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

Side by Side Diff: ash/extended_desktop_unittest.cc

Issue 2390953004: WidgetDelegateView is its own contents view. (Closed)
Patch Set: another minor fix Created 4 years, 2 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/aura/wm_window_aura.h" 5 #include "ash/aura/wm_window_aura.h"
6 #include "ash/common/shell_window_ids.h" 6 #include "ash/common/shell_window_ids.h"
7 #include "ash/common/system/tray/system_tray.h" 7 #include "ash/common/system/tray/system_tray.h"
8 #include "ash/common/wm/root_window_finder.h" 8 #include "ash/common/wm/root_window_finder.h"
9 #include "ash/display/display_manager.h" 9 #include "ash/display/display_manager.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( 42 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays(
43 std::move(layout)); 43 std::move(layout));
44 } 44 }
45 45
46 class ModalWidgetDelegate : public views::WidgetDelegateView { 46 class ModalWidgetDelegate : public views::WidgetDelegateView {
47 public: 47 public:
48 ModalWidgetDelegate() {} 48 ModalWidgetDelegate() {}
49 ~ModalWidgetDelegate() override {} 49 ~ModalWidgetDelegate() override {}
50 50
51 // Overridden from views::WidgetDelegate: 51 // Overridden from views::WidgetDelegate:
52 views::View* GetContentsView() override { return this; }
53 ui::ModalType GetModalType() const override { return ui::MODAL_TYPE_SYSTEM; } 52 ui::ModalType GetModalType() const override { return ui::MODAL_TYPE_SYSTEM; }
54 53
55 private: 54 private:
56 DISALLOW_COPY_AND_ASSIGN(ModalWidgetDelegate); 55 DISALLOW_COPY_AND_ASSIGN(ModalWidgetDelegate);
57 }; 56 };
58 57
59 // An event handler which moves the target window to the secondary root window 58 // An event handler which moves the target window to the secondary root window
60 // at pre-handle phase of a mouse release event. 59 // at pre-handle phase of a mouse release event.
61 class MoveWindowByClickEventHandler : public ui::EventHandler { 60 class MoveWindowByClickEventHandler : public ui::EventHandler {
62 public: 61 public:
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 generator.ReleaseLeftButton(); 927 generator.ReleaseLeftButton();
929 EXPECT_EQ("-999,-999 -999,-999", event_handler.GetLocationsAndReset()); 928 EXPECT_EQ("-999,-999 -999,-999", event_handler.GetLocationsAndReset());
930 929
931 generator.MoveMouseTo(400, 150); 930 generator.MoveMouseTo(400, 150);
932 EXPECT_EQ("100,150 100,150", event_handler.GetLocationsAndReset()); 931 EXPECT_EQ("100,150 100,150", event_handler.GetLocationsAndReset());
933 932
934 ash::Shell::GetInstance()->RemovePreTargetHandler(&event_handler); 933 ash::Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
935 } 934 }
936 935
937 } // namespace ash 936 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698