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

Side by Side Diff: ui/aura_shell/stacking_controller.cc

Issue 8523020: Fix menu crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: check transient path Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_shell/stacking_controller.h" 5 #include "ui/aura_shell/stacking_controller.h"
6 6
7 #include "ui/aura/desktop.h" 7 #include "ui/aura/desktop.h"
8 #include "ui/aura/window.h" 8 #include "ui/aura/window.h"
9 #include "ui/aura_shell/shell.h" 9 #include "ui/aura_shell/shell.h"
10 #include "ui/aura_shell/shell_window_ids.h" 10 #include "ui/aura_shell/shell_window_ids.h"
(...skipping 24 matching lines...) Expand all
35 StackingController::~StackingController() { 35 StackingController::~StackingController() {
36 } 36 }
37 37
38 // static 38 // static
39 aura::Window* StackingController::GetActivatableWindow(aura::Window* window) { 39 aura::Window* StackingController::GetActivatableWindow(aura::Window* window) {
40 aura::Window* parent = window->parent(); 40 aura::Window* parent = window->parent();
41 aura::Window* child = window; 41 aura::Window* child = window;
42 while (parent) { 42 while (parent) {
43 if (SupportsChildActivation(parent)) 43 if (SupportsChildActivation(parent))
44 return child; 44 return child;
45 // If |child| isn't activatable, but has transient parent, trace
46 // that path instead.
47 if (child->transient_parent())
48 return GetActivatableWindow(child->transient_parent());
45 parent = parent->parent(); 49 parent = parent->parent();
46 child = child->parent(); 50 child = child->parent();
47 } 51 }
48 return false; 52 return false;
49 } 53 }
50 54
51 //////////////////////////////////////////////////////////////////////////////// 55 ////////////////////////////////////////////////////////////////////////////////
52 // StackingController, aura::StackingClient implementation: 56 // StackingController, aura::StackingClient implementation:
53 57
54 void StackingController::AddChildToDefaultParent(aura::Window* window) { 58 void StackingController::AddChildToDefaultParent(aura::Window* window) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 90 }
87 return NULL; 91 return NULL;
88 } 92 }
89 93
90 94
91 //////////////////////////////////////////////////////////////////////////////// 95 ////////////////////////////////////////////////////////////////////////////////
92 // StackingController, private: 96 // StackingController, private:
93 97
94 } // namespace internal 98 } // namespace internal
95 } // namespace aura_shell 99 } // namespace aura_shell
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698