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

Side by Side Diff: ash/wm/system_modal_container_layout_manager_unittest.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/system_gesture_event_filter_unittest.cc ('k') | ash/wm/toplevel_window_event_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/wm/system_modal_container_layout_manager.h" 5 #include "ash/wm/system_modal_container_layout_manager.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/session_state_delegate.h" 8 #include "ash/session_state_delegate.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 DISALLOW_COPY_AND_ASSIGN(TestWindow); 84 DISALLOW_COPY_AND_ASSIGN(TestWindow);
85 }; 85 };
86 86
87 class EventTestWindow : public TestWindow { 87 class EventTestWindow : public TestWindow {
88 public: 88 public:
89 explicit EventTestWindow(bool modal) : TestWindow(modal), 89 explicit EventTestWindow(bool modal) : TestWindow(modal),
90 mouse_presses_(0) {} 90 mouse_presses_(0) {}
91 virtual ~EventTestWindow() {} 91 virtual ~EventTestWindow() {}
92 92
93 aura::Window* OpenTestWindowWithContext(aura::RootWindow* context) { 93 aura::Window* OpenTestWindowWithContext(aura::Window* context) {
94 views::Widget* widget = 94 views::Widget* widget =
95 views::Widget::CreateWindowWithContext(this, context); 95 views::Widget::CreateWindowWithContext(this, context);
96 widget->Show(); 96 widget->Show();
97 return widget->GetNativeView(); 97 return widget->GetNativeView();
98 } 98 }
99 99
100 aura::Window* OpenTestWindowWithParent(aura::Window* parent) { 100 aura::Window* OpenTestWindowWithParent(aura::Window* parent) {
101 DCHECK(parent); 101 DCHECK(parent);
102 views::Widget* widget = 102 views::Widget* widget =
103 views::Widget::CreateWindowWithParent(this, parent); 103 views::Widget::CreateWindowWithParent(this, parent);
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 486
487 // No more modal screen. 487 // No more modal screen.
488 modal1->Hide(); 488 modal1->Hide();
489 TestWindow::CloseTestWindow(modal1.release()); 489 TestWindow::CloseTestWindow(modal1.release());
490 EXPECT_FALSE(AllRootWindowsHaveModalBackgrounds()); 490 EXPECT_FALSE(AllRootWindowsHaveModalBackgrounds());
491 EXPECT_TRUE(wm::IsActiveWindow(normal.get())); 491 EXPECT_TRUE(wm::IsActiveWindow(normal.get()));
492 } 492 }
493 493
494 } // namespace test 494 } // namespace test
495 } // namespace ash 495 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/system_gesture_event_filter_unittest.cc ('k') | ash/wm/toplevel_window_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698