| OLD | NEW |
| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <set> | 6 #include <set> |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 Widget::InitParams init_params; | 1127 Widget::InitParams init_params; |
| 1128 init_params.type = Widget::InitParams::TYPE_WINDOW; | 1128 init_params.type = Widget::InitParams::TYPE_WINDOW; |
| 1129 init_params.bounds = bounds; | 1129 init_params.bounds = bounds; |
| 1130 init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 1130 init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
| 1131 init_params.layer_type = ui::LAYER_NOT_DRAWN; | 1131 init_params.layer_type = ui::LAYER_NOT_DRAWN; |
| 1132 init_params.accept_events = fullscreen; | 1132 init_params.accept_events = fullscreen; |
| 1133 | 1133 |
| 1134 widget_.Init(init_params); | 1134 widget_.Init(init_params); |
| 1135 | 1135 |
| 1136 owned_window_ = new aura::Window(&child_window_delegate_); | 1136 owned_window_ = new aura::Window(&child_window_delegate_); |
| 1137 owned_window_->SetType(aura::client::WINDOW_TYPE_NORMAL); | 1137 owned_window_->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
| 1138 owned_window_->SetName("TestTopLevelWindow"); | 1138 owned_window_->SetName("TestTopLevelWindow"); |
| 1139 if (fullscreen) { | 1139 if (fullscreen) { |
| 1140 owned_window_->SetProperty(aura::client::kShowStateKey, | 1140 owned_window_->SetProperty(aura::client::kShowStateKey, |
| 1141 ui::SHOW_STATE_FULLSCREEN); | 1141 ui::SHOW_STATE_FULLSCREEN); |
| 1142 } else { | 1142 } else { |
| 1143 owned_window_->SetType(aura::client::WINDOW_TYPE_MENU); | 1143 owned_window_->SetType(ui::wm::WINDOW_TYPE_MENU); |
| 1144 } | 1144 } |
| 1145 owned_window_->Init(ui::LAYER_TEXTURED); | 1145 owned_window_->Init(ui::LAYER_TEXTURED); |
| 1146 aura::client::ParentWindowWithContext( | 1146 aura::client::ParentWindowWithContext( |
| 1147 owned_window_, | 1147 owned_window_, |
| 1148 widget_.GetNativeView()->GetRootWindow(), | 1148 widget_.GetNativeView()->GetRootWindow(), |
| 1149 gfx::Rect(0, 0, 1900, 1600)); | 1149 gfx::Rect(0, 0, 1900, 1600)); |
| 1150 owned_window_->Show(); | 1150 owned_window_->Show(); |
| 1151 owned_window_->AddObserver(this); | 1151 owned_window_->AddObserver(this); |
| 1152 | 1152 |
| 1153 ASSERT_TRUE(owned_window_->parent() != NULL); | 1153 ASSERT_TRUE(owned_window_->parent() != NULL); |
| (...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2234 EXPECT_EQ(activate_result, MA_ACTIVATE); | 2234 EXPECT_EQ(activate_result, MA_ACTIVATE); |
| 2235 | 2235 |
| 2236 modal_dialog_widget->CloseNow(); | 2236 modal_dialog_widget->CloseNow(); |
| 2237 top_level_widget.CloseNow(); | 2237 top_level_widget.CloseNow(); |
| 2238 } | 2238 } |
| 2239 #endif | 2239 #endif |
| 2240 #endif | 2240 #endif |
| 2241 | 2241 |
| 2242 } // namespace test | 2242 } // namespace test |
| 2243 } // namespace views | 2243 } // namespace views |
| OLD | NEW |