| 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 2394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2405 CreateParams(Widget::InitParams::TYPE_POPUP); | 2405 CreateParams(Widget::InitParams::TYPE_POPUP); |
| 2406 parent_params.native_widget = new PlatformDesktopNativeWidget(&parent_widget); | 2406 parent_params.native_widget = new PlatformDesktopNativeWidget(&parent_widget); |
| 2407 parent_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 2407 parent_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
| 2408 parent_widget.Init(parent_params); | 2408 parent_widget.Init(parent_params); |
| 2409 parent_widget.Show(); | 2409 parent_widget.Show(); |
| 2410 | 2410 |
| 2411 Widget child_widget; | 2411 Widget child_widget; |
| 2412 Widget::InitParams child_params = | 2412 Widget::InitParams child_params = |
| 2413 CreateParams(Widget::InitParams::TYPE_POPUP); | 2413 CreateParams(Widget::InitParams::TYPE_POPUP); |
| 2414 child_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 2414 child_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
| 2415 child_params.context = parent_widget.GetNativeView(); | 2415 child_params.context = parent_widget.GetNativeWindow(); |
| 2416 child_widget.Init(child_params); | 2416 child_widget.Init(child_params); |
| 2417 child_widget.AddObserver(&observer); | 2417 child_widget.AddObserver(&observer); |
| 2418 child_widget.Show(); | 2418 child_widget.Show(); |
| 2419 | 2419 |
| 2420 parent_widget.CloseNow(); | 2420 parent_widget.CloseNow(); |
| 2421 } | 2421 } |
| 2422 #endif // !defined(OS_CHROMEOS) | 2422 #endif // !defined(OS_CHROMEOS) |
| 2423 | 2423 |
| 2424 } // namespace test | 2424 } // namespace test |
| 2425 } // namespace views | 2425 } // namespace views |
| OLD | NEW |