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

Unified Diff: ui/aura/test_desktop_delegate.cc

Issue 8194004: change the way windows are parented when their parent is set to NULL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/test_desktop_delegate.h ('k') | ui/aura/toplevel_window_container.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test_desktop_delegate.cc
===================================================================
--- ui/aura/test_desktop_delegate.cc (revision 0)
+++ ui/aura/test_desktop_delegate.cc (revision 0)
@@ -0,0 +1,33 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/aura/test_desktop_delegate.h"
+
+#include "ui/aura/desktop.h"
+
+namespace aura {
+
+TestDesktopDelegate::TestDesktopDelegate()
+ : default_container_(new ToplevelWindowContainer) {
+ Desktop::GetInstance()->set_delegate(this);
+ default_container_->Init();
+ default_container_->SetBounds(
+ gfx::Rect(gfx::Point(), Desktop::GetInstance()->GetSize()));
+ Desktop::GetInstance()->window()->AddChild(default_container_.get());
+ default_container_->Show();
+}
+
+TestDesktopDelegate::~TestDesktopDelegate() {
+}
+
+
+void TestDesktopDelegate::AddChildToDefaultParent(Window* window) {
+ default_container_->AddChild(window);
+}
+
+Window* TestDesktopDelegate::GetTopmostWindowToActivate(Window* ignore) const {
+ return default_container_->GetTopmostWindowToActivate(ignore);
+}
+
+} // namespace aura
Property changes on: ui\aura\test_desktop_delegate.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « ui/aura/test_desktop_delegate.h ('k') | ui/aura/toplevel_window_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698