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 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 Widget::InitParams init_params; | 1112 Widget::InitParams init_params; |
1113 init_params.type = Widget::InitParams::TYPE_WINDOW; | 1113 init_params.type = Widget::InitParams::TYPE_WINDOW; |
1114 init_params.bounds = bounds; | 1114 init_params.bounds = bounds; |
1115 init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 1115 init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
1116 init_params.layer_type = ui::LAYER_NOT_DRAWN; | 1116 init_params.layer_type = ui::LAYER_NOT_DRAWN; |
1117 init_params.accept_events = fullscreen; | 1117 init_params.accept_events = fullscreen; |
1118 | 1118 |
1119 widget_.Init(init_params); | 1119 widget_.Init(init_params); |
1120 | 1120 |
1121 owned_window_ = new aura::Window(&child_window_delegate_); | 1121 owned_window_ = new aura::Window(&child_window_delegate_); |
1122 owned_window_->SetType(aura::client::WINDOW_TYPE_NORMAL); | 1122 owned_window_->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
1123 owned_window_->SetName("TestTopLevelWindow"); | 1123 owned_window_->SetName("TestTopLevelWindow"); |
1124 if (fullscreen) { | 1124 if (fullscreen) { |
1125 owned_window_->SetProperty(aura::client::kShowStateKey, | 1125 owned_window_->SetProperty(aura::client::kShowStateKey, |
1126 ui::SHOW_STATE_FULLSCREEN); | 1126 ui::SHOW_STATE_FULLSCREEN); |
1127 } else { | 1127 } else { |
1128 owned_window_->SetType(aura::client::WINDOW_TYPE_MENU); | 1128 owned_window_->SetType(ui::wm::WINDOW_TYPE_MENU); |
1129 } | 1129 } |
1130 owned_window_->Init(ui::LAYER_TEXTURED); | 1130 owned_window_->Init(ui::LAYER_TEXTURED); |
1131 aura::client::ParentWindowWithContext( | 1131 aura::client::ParentWindowWithContext( |
1132 owned_window_, | 1132 owned_window_, |
1133 widget_.GetNativeView()->GetRootWindow(), | 1133 widget_.GetNativeView()->GetRootWindow(), |
1134 gfx::Rect(0, 0, 1900, 1600)); | 1134 gfx::Rect(0, 0, 1900, 1600)); |
1135 owned_window_->Show(); | 1135 owned_window_->Show(); |
1136 owned_window_->AddObserver(this); | 1136 owned_window_->AddObserver(this); |
1137 | 1137 |
1138 ASSERT_TRUE(owned_window_->parent() != NULL); | 1138 ASSERT_TRUE(owned_window_->parent() != NULL); |
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2223 EXPECT_EQ(activate_result, MA_ACTIVATE); | 2223 EXPECT_EQ(activate_result, MA_ACTIVATE); |
2224 | 2224 |
2225 modal_dialog_widget->CloseNow(); | 2225 modal_dialog_widget->CloseNow(); |
2226 top_level_widget.CloseNow(); | 2226 top_level_widget.CloseNow(); |
2227 } | 2227 } |
2228 #endif | 2228 #endif |
2229 #endif | 2229 #endif |
2230 | 2230 |
2231 } // namespace test | 2231 } // namespace test |
2232 } // namespace views | 2232 } // namespace views |
OLD | NEW |