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

Side by Side Diff: ui/aura/client/window_parenting_client.cc

Issue 2762633003: Remove unused |context| from GetDefaultParent(). (Closed)
Patch Set: update comments. Created 3 years, 9 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/client/window_parenting_client.h" 5 #include "ui/aura/client/window_parenting_client.h"
6 6
7 #include "ui/aura/env.h" 7 #include "ui/aura/env.h"
8 #include "ui/aura/window.h" 8 #include "ui/aura/window.h"
9 #include "ui/aura/window_event_dispatcher.h" 9 #include "ui/aura/window_event_dispatcher.h"
10 #include "ui/base/class_property.h" 10 #include "ui/base/class_property.h"
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 40
41 void ParentWindowWithContext(Window* window, 41 void ParentWindowWithContext(Window* window,
42 Window* context, 42 Window* context,
43 const gfx::Rect& screen_bounds) { 43 const gfx::Rect& screen_bounds) {
44 DCHECK(context); 44 DCHECK(context);
45 45
46 // |context| must be attached to a hierarchy with a WindowParentingClient. 46 // |context| must be attached to a hierarchy with a WindowParentingClient.
47 WindowParentingClient* client = GetWindowParentingClient(context); 47 WindowParentingClient* client = GetWindowParentingClient(context);
48 DCHECK(client); 48 DCHECK(client);
49 Window* default_parent = 49 Window* default_parent = client->GetDefaultParent(window, screen_bounds);
50 client->GetDefaultParent(context, window, screen_bounds);
51 default_parent->AddChild(window); 50 default_parent->AddChild(window);
52 } 51 }
53 52
54 } // namespace client 53 } // namespace client
55 } // namespace aura 54 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698