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

Side by Side Diff: ash/wm/system_modal_container_layout_manager_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/common/wm/system_modal_container_layout_manager.h" 5 #include "ash/common/wm/system_modal_container_layout_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "ash/aura/wm_window_aura.h" 9 #include "ash/aura/wm_window_aura.h"
10 #include "ash/common/session/session_state_delegate.h" 10 #include "ash/common/session/session_state_delegate.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // The window needs be closed from widget in order for 77 // The window needs be closed from widget in order for
78 // aura::client::kModalKey property to be reset. 78 // aura::client::kModalKey property to be reset.
79 static void CloseTestWindow(aura::Window* window) { 79 static void CloseTestWindow(aura::Window* window) {
80 views::Widget::GetWidgetForNativeWindow(window)->Close(); 80 views::Widget::GetWidgetForNativeWindow(window)->Close();
81 } 81 }
82 82
83 // Overridden from views::View: 83 // Overridden from views::View:
84 gfx::Size GetPreferredSize() const override { return gfx::Size(50, 50); } 84 gfx::Size GetPreferredSize() const override { return gfx::Size(50, 50); }
85 85
86 // Overridden from views::WidgetDelegate: 86 // Overridden from views::WidgetDelegate:
87 views::View* GetContentsView() override { return this; }
88 ui::ModalType GetModalType() const override { 87 ui::ModalType GetModalType() const override {
89 return modal_ ? ui::MODAL_TYPE_SYSTEM : ui::MODAL_TYPE_NONE; 88 return modal_ ? ui::MODAL_TYPE_SYSTEM : ui::MODAL_TYPE_NONE;
90 } 89 }
91 90
92 private: 91 private:
93 bool modal_; 92 bool modal_;
94 93
95 DISALLOW_COPY_AND_ASSIGN(TestWindow); 94 DISALLOW_COPY_AND_ASSIGN(TestWindow);
96 }; 95 };
97 96
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 if (!SupportsMultipleDisplays()) 896 if (!SupportsMultipleDisplays())
898 return; 897 return;
899 898
900 UpdateDisplay("500x500, 500x500"); 899 UpdateDisplay("500x500, 500x500");
901 InputTestDelegate delegate; 900 InputTestDelegate delegate;
902 delegate.RunTest(this); 901 delegate.RunTest(this);
903 } 902 }
904 903
905 } // namespace test 904 } // namespace test
906 } // namespace ash 905 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698