1868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved. 2868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 3868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// found in the LICENSE file. 4868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 57d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#ifndef ASH_HOST_ROOT_WINDOW_TRANSFORMER_H_ 6868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#define ASH_HOST_ROOT_WINDOW_TRANSFORMER_H_ 7868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 8868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#include "ash/ash_export.h" 97d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 107d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)namespace gfx { 11868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)class Insets; 12868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)class Rect; 137d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)class Size; 14868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)class Transform; 15868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)} 16868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 17868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)namespace ash { 18868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 19868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// RootWindowTransformer controls how RootWindow should be placed and 207d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)// transformed inside the host window. 21868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)class ASH_EXPORT RootWindowTransformer { 227d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) public: 237d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) virtual ~RootWindowTransformer() {} 247d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 257d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) // Returns the transform the root window in DIP. 267d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) virtual gfx::Transform GetTransform() const = 0; 27868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 28868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) // Returns the inverse of the transform above. This method is to 297d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) // provie an accurate inverse of the transform because the result of 307d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) // |gfx::Transform::GetInverse| may contains computational error. 317d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) virtual gfx::Transform GetInverseTransform() const = 0; 327d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 337d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) // Returns the root window's bounds for given host window size in DIP. 347d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) // This is necessary to handle the case where the root window's size 357d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) // is bigger than the host window. (Screen magnifier for example). 367d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) virtual gfx::Rect GetRootWindowBounds(const gfx::Size& host_size) const = 0; 377d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 387d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) // Returns the insets that specifies the effective area of 392385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch // the host window. 40cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) virtual gfx::Insets GetHostInsets() const = 0; 41cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)}; 42cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} // namespace ash 44116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch 45868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#endif // ASH_HOST_ROOT_WINDOW_TRANSFORMER_H_ 467d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)