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

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

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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/panels/panel_frame_view.cc ('k') | ash/wm/workspace/multi_window_resize_controller.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/session_state_delegate.h" 8 #include "ash/session/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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 explicit TestWindow(bool modal) : modal_(modal) {} 66 explicit TestWindow(bool modal) : modal_(modal) {}
67 virtual ~TestWindow() {} 67 virtual ~TestWindow() {}
68 68
69 // The window needs be closed from widget in order for 69 // The window needs be closed from widget in order for
70 // aura::client::kModalKey property to be reset. 70 // aura::client::kModalKey property to be reset.
71 static void CloseTestWindow(aura::Window* window) { 71 static void CloseTestWindow(aura::Window* window) {
72 views::Widget::GetWidgetForNativeWindow(window)->Close(); 72 views::Widget::GetWidgetForNativeWindow(window)->Close();
73 } 73 }
74 74
75 // Overridden from views::View: 75 // Overridden from views::View:
76 virtual gfx::Size GetPreferredSize() OVERRIDE { 76 virtual gfx::Size GetPreferredSize() const OVERRIDE {
77 return gfx::Size(50, 50); 77 return gfx::Size(50, 50);
78 } 78 }
79 79
80 // Overridden from views::WidgetDelegate: 80 // Overridden from views::WidgetDelegate:
81 virtual views::View* GetContentsView() OVERRIDE { 81 virtual views::View* GetContentsView() OVERRIDE {
82 return this; 82 return this;
83 } 83 }
84 virtual ui::ModalType GetModalType() const OVERRIDE { 84 virtual ui::ModalType GetModalType() const OVERRIDE {
85 return modal_ ? ui::MODAL_TYPE_SYSTEM : ui::MODAL_TYPE_NONE; 85 return modal_ ? ui::MODAL_TYPE_SYSTEM : ui::MODAL_TYPE_NONE;
86 } 86 }
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 ShowKeyboard(true); 650 ShowKeyboard(true);
651 EXPECT_EQ(modal_size.ToString(), modal_window->bounds().size().ToString()); 651 EXPECT_EQ(modal_size.ToString(), modal_window->bounds().size().ToString());
652 EXPECT_EQ(modal_origin.x(), modal_window->bounds().x()); 652 EXPECT_EQ(modal_origin.x(), modal_window->bounds().x());
653 EXPECT_EQ(0, modal_window->bounds().y()); 653 EXPECT_EQ(0, modal_window->bounds().y());
654 654
655 ShowKeyboard(false); 655 ShowKeyboard(false);
656 } 656 }
657 657
658 } // namespace test 658 } // namespace test
659 } // namespace ash 659 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_frame_view.cc ('k') | ash/wm/workspace/multi_window_resize_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698