15d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Copyright (c) 2013 The Chromium Authors. All rights reserved. 25d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// found in the LICENSE file. 45d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 55d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#ifndef UI_AURA_CLIENT_WINDOW_STACKING_CLIENT_H_ 65d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define UI_AURA_CLIENT_WINDOW_STACKING_CLIENT_H_ 75d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "base/basictypes.h" 95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "base/memory/scoped_ptr.h" 105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "ui/aura/aura_export.h" 115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "ui/aura/window.h" 125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)namespace aura { 145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)namespace client { 155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class AURA_EXPORT WindowStackingClient { 175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) public: 185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Invoked from the various Window stacking functions. Allows the 195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // WindowStackingClient to alter the source, target and/or direction to stack. 205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Returns true if stacking should continue; false if the stacking should not 215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // happen. 225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual bool AdjustStacking(Window** child, 235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) Window** target, 245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) Window::StackDirection* direction) = 0; 255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) protected: 275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual ~WindowStackingClient() {} 285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}; 295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Sets/gets the WindowStackingClient. This does *not* take ownership of 315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// |client|. It is assumed the caller will invoke SetWindowStackingClient(NULL) 325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// before deleting |client|. 335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)AURA_EXPORT void SetWindowStackingClient(WindowStackingClient* client); 345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)AURA_EXPORT WindowStackingClient* GetWindowStackingClient(); 355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} // namespace client 375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} // namespace aura 385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif // UI_AURA_CLIENT_WINDOW_STACKING_CLIENT_H_ 40