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

Side by Side Diff: ui/aura/test/aura_test_base.cc

Issue 1050713002: aura: Remove layerless windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layerless: rebase Created 5 years, 8 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
« no previous file with comments | « ui/aura/demo/demo_main.cc ('k') | ui/aura/test/test_windows.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 "ui/aura/test/aura_test_base.h" 5 #include "ui/aura/test/aura_test_base.h"
6 6
7 #include "ui/aura/client/window_tree_client.h" 7 #include "ui/aura/client/window_tree_client.h"
8 #include "ui/aura/test/aura_test_helper.h" 8 #include "ui/aura/test/aura_test_helper.h"
9 #include "ui/aura/test/test_window_delegate.h" 9 #include "ui/aura/test/test_window_delegate.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 ui::ShutdownInputMethodForTesting(); 87 ui::ShutdownInputMethodForTesting();
88 testing::Test::TearDown(); 88 testing::Test::TearDown();
89 } 89 }
90 90
91 Window* AuraTestBase::CreateNormalWindow(int id, Window* parent, 91 Window* AuraTestBase::CreateNormalWindow(int id, Window* parent,
92 WindowDelegate* delegate) { 92 WindowDelegate* delegate) {
93 Window* window = new Window( 93 Window* window = new Window(
94 delegate ? delegate : 94 delegate ? delegate :
95 test::TestWindowDelegate::CreateSelfDestroyingDelegate()); 95 test::TestWindowDelegate::CreateSelfDestroyingDelegate());
96 window->set_id(id); 96 window->set_id(id);
97 window->Init(aura::WINDOW_LAYER_TEXTURED); 97 window->Init(ui::LAYER_TEXTURED);
98 parent->AddChild(window); 98 parent->AddChild(window);
99 window->SetBounds(gfx::Rect(0, 0, 100, 100)); 99 window->SetBounds(gfx::Rect(0, 0, 100, 100));
100 window->Show(); 100 window->Show();
101 return window; 101 return window;
102 } 102 }
103 103
104 void AuraTestBase::RunAllPendingInMessageLoop() { 104 void AuraTestBase::RunAllPendingInMessageLoop() {
105 helper_->RunAllPendingInMessageLoop(); 105 helper_->RunAllPendingInMessageLoop();
106 } 106 }
107 107
108 void AuraTestBase::ParentWindow(Window* window) { 108 void AuraTestBase::ParentWindow(Window* window) {
109 client::ParentWindowWithContext(window, root_window(), gfx::Rect()); 109 client::ParentWindowWithContext(window, root_window(), gfx::Rect());
110 } 110 }
111 111
112 bool AuraTestBase::DispatchEventUsingWindowDispatcher(ui::Event* event) { 112 bool AuraTestBase::DispatchEventUsingWindowDispatcher(ui::Event* event) {
113 ui::EventDispatchDetails details = 113 ui::EventDispatchDetails details =
114 event_processor()->OnEventFromSource(event); 114 event_processor()->OnEventFromSource(event);
115 CHECK(!details.dispatcher_destroyed); 115 CHECK(!details.dispatcher_destroyed);
116 return event->handled(); 116 return event->handled();
117 } 117 }
118 118
119 } // namespace test 119 } // namespace test
120 } // namespace aura 120 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/demo/demo_main.cc ('k') | ui/aura/test/test_windows.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698