15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_ 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define UI_VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_ 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 85e3f23d412006dc4db4e659864679f29341e113fTorne (Richard Coles)#include "base/strings/string16.h" 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "ui/base/ui_base_types.h" 105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "ui/gfx/native_widget_types.h" 115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "ui/views/ime/input_method_delegate.h" 125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "ui/views/widget/native_widget.h" 135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace gfx { 155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class ImageSkia; 165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class Rect; 175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} 185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace ui { 205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class NativeTheme; 215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class OSExchangeData; 225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} 235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace views { 255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class InputMethod; 265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class TooltipManager; 275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace internal { 285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//////////////////////////////////////////////////////////////////////////////// 305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// NativeWidgetPrivate interface 315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// 325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// A NativeWidget subclass internal to views that provides Widget a conduit for 335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// communication with a backend-specific native widget implementation. 345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// 355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Many of the methods here are pass-thrus for Widget, and as such there is no 365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// documentation for them here. In that case, see methods of the same name in 375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// widget.h. 385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// 395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// IMPORTANT: This type is intended for use only by the views system and for 405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// NativeWidget implementations. This file should not be included 415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// in code that does not fall into one of these use cases. 425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// 435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class VIEWS_EXPORT NativeWidgetPrivate : public NativeWidget { 445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) public: 455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual ~NativeWidgetPrivate() {} 465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Creates an appropriate default NativeWidgetPrivate implementation for the 485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // current OS/circumstance. 495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) static NativeWidgetPrivate* CreateNativeWidget( 505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) internal::NativeWidgetDelegate* delegate); 515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) static NativeWidgetPrivate* GetNativeWidgetForNativeView( 535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) gfx::NativeView native_view); 545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) static NativeWidgetPrivate* GetNativeWidgetForNativeWindow( 555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) gfx::NativeWindow native_window); 565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Retrieves the top NativeWidgetPrivate in the hierarchy containing the given 585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // NativeView, or NULL if there is no NativeWidgetPrivate that contains it. 595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) static NativeWidgetPrivate* GetTopLevelNativeWidget( 605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) gfx::NativeView native_view); 615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) static void GetAllChildWidgets(gfx::NativeView native_view, 635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) Widget::Widgets* children); 64d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles) static void GetAllOwnedWidgets(gfx::NativeView native_view, 65d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles) Widget::Widgets* owned); 665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) static void ReparentNativeView(gfx::NativeView native_view, 675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) gfx::NativeView new_parent); 685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Returns true if any mouse button is currently down. 705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) static bool IsMouseButtonDown(); 715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Returns true if any touch device is currently down. 735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) static bool IsTouchDown(); 745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Initializes the NativeWidget. 765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void InitNativeWidget(const Widget::InitParams& params) = 0; 775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Returns a NonClientFrameView for the widget's NonClientView, or NULL if 795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // the NativeWidget wants no special NonClientFrameView. 805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual NonClientFrameView* CreateNonClientFrameView() = 0; 815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual bool ShouldUseNativeFrame() const = 0; 835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void FrameTypeChanged() = 0; 845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Returns the Widget associated with this NativeWidget. This function is 865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // guaranteed to return non-NULL for the lifetime of the NativeWidget. 875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual Widget* GetWidget() = 0; 885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual const Widget* GetWidget() const = 0; 895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Returns the NativeView/Window associated with this NativeWidget. 915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual gfx::NativeView GetNativeView() const = 0; 925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual gfx::NativeWindow GetNativeWindow() const = 0; 935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Returns the topmost Widget in a hierarchy. 955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual Widget* GetTopLevelWidget() = 0; 965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Returns the Compositor, or NULL if there isn't one associated with this 985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // NativeWidget. 995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual const ui::Compositor* GetCompositor() const = 0; 1005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual ui::Compositor* GetCompositor() = 0; 1015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 10290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) // Returns the NativeWidget's layer, if any. 10390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles) virtual ui::Layer* GetLayer() = 0; 1045821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 105868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) // Reorders the widget's child NativeViews which are associated to the view 106868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) // tree (eg via a NativeViewHost) to match the z-order of the views in the 107868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) // view tree. The z-order of views with layers relative to views with 108868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) // associated NativeViews is used to reorder the NativeView layers. This 109868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) // method assumes that the widget's child layers which are owned by a view are 110868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) // already in the correct z-order relative to each other and does no 111868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) // reordering if there are no views with an associated NativeView. 112868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) virtual void ReorderNativeViews() = 0; 113868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 1145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Notifies the NativeWidget that a view was removed from the Widget's view 1155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // hierarchy. 1165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void ViewRemoved(View* view) = 0; 1175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Sets/Gets a native window property on the underlying native window object. 1195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Returns NULL if the property does not exist. Setting the property value to 1205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // NULL removes the property. 1215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void SetNativeWindowProperty(const char* name, void* value) = 0; 1225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void* GetNativeWindowProperty(const char* name) const = 0; 1235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Returns the native widget's tooltip manager. Called from the View hierarchy 1255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // to update tooltips. 1265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual TooltipManager* GetTooltipManager() const = 0; 1275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Sets or releases event capturing for this native widget. 1295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void SetCapture() = 0; 1305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void ReleaseCapture() = 0; 1315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Returns true if this native widget is capturing events. 1335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual bool HasCapture() const = 0; 1345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Returns the InputMethod for this native widget. 1365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Note that all widgets in a widget hierarchy share the same input method. 1375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // TODO(suzhe): rename to GetInputMethod() when NativeWidget implementation 1385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // class doesn't inherit Widget anymore. 1395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual InputMethod* CreateInputMethod() = 0; 1405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Returns the InputMethodDelegate for this native widget. 1425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual InputMethodDelegate* GetInputMethodDelegate() = 0; 1435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Centers the window and sizes it to the specified size. 1465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void CenterWindow(const gfx::Size& size) = 0; 1475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Retrieves the window's current restored bounds and "show" state, for 1495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // persisting. 1505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void GetWindowPlacement( 1515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) gfx::Rect* bounds, 1525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ui::WindowShowState* show_state) const = 0; 1535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 154a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) // Sets the NativeWindow title. Returns true if the title changed. 155a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles) virtual bool SetWindowTitle(const string16& title) = 0; 1565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Sets the Window icons. |window_icon| is a 16x16 icon suitable for use in 1585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // a title bar. |app_icon| is a larger size for use in the host environment 1595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // app switching UI. 1605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void SetWindowIcons(const gfx::ImageSkia& window_icon, 1615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) const gfx::ImageSkia& app_icon) = 0; 1625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Initializes the modal type of the window to |modal_type|. Called from 1645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // NativeWidgetDelegate::OnNativeWidgetCreated() before the widget is 1655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // initially parented. 1665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void InitModalType(ui::ModalType modal_type) = 0; 1675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 1685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // See method documentation in Widget. 1695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual gfx::Rect GetWindowBoundsInScreen() const = 0; 1705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual gfx::Rect GetClientAreaBoundsInScreen() const = 0; 1715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual gfx::Rect GetRestoredBounds() const = 0; 1725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void SetBounds(const gfx::Rect& bounds) = 0; 1735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void SetSize(const gfx::Size& size) = 0; 1745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void StackAbove(gfx::NativeView native_view) = 0; 1755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void StackAtTop() = 0; 1765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void StackBelow(gfx::NativeView native_view) = 0; 1775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void SetShape(gfx::NativeRegion shape) = 0; 1785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void Close() = 0; 1795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void CloseNow() = 0; 1805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void Show() = 0; 1815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void Hide() = 0; 1825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Invoked if the initial show should maximize the window. |restored_bounds| 1835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // is the bounds of the window when not maximized. 1845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) = 0; 1855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void ShowWithWindowState(ui::WindowShowState show_state) = 0; 1865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual bool IsVisible() const = 0; 1875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void Activate() = 0; 1885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void Deactivate() = 0; 1895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual bool IsActive() const = 0; 1905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void SetAlwaysOnTop(bool always_on_top) = 0; 1914e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles) virtual bool IsAlwaysOnTop() const = 0; 1925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void Maximize() = 0; 1935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void Minimize() = 0; 1945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual bool IsMaximized() const = 0; 1955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual bool IsMinimized() const = 0; 1965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void Restore() = 0; 1975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void SetFullscreen(bool fullscreen) = 0; 1985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual bool IsFullscreen() const = 0; 1995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void SetOpacity(unsigned char opacity) = 0; 2005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void SetUseDragFrame(bool use_drag_frame) = 0; 2015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void FlashFrame(bool flash) = 0; 2025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void RunShellDrag(View* view, 2035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) const ui::OSExchangeData& data, 2045821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) const gfx::Point& location, 2055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int operation, 2065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ui::DragDropTypes::DragEventSource source) = 0; 2075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void SchedulePaintInRect(const gfx::Rect& rect) = 0; 2085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void SetCursor(gfx::NativeCursor cursor) = 0; 2097d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) virtual bool IsMouseEventsEnabled() const = 0; 2105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void ClearNativeFocus() = 0; 2115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual gfx::Rect GetWorkAreaBoundsInScreen() const = 0; 2125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual Widget::MoveLoopResult RunMoveLoop( 2132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) const gfx::Vector2d& drag_offset, 21468043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles) Widget::MoveLoopSource source, 21568043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles) Widget::MoveLoopEscapeBehavior escape_behavior) = 0; 2165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void EndMoveLoop() = 0; 2175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void SetVisibilityChangedAnimationsEnabled(bool value) = 0; 2185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual ui::NativeTheme* GetNativeTheme() const = 0; 21958537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) virtual void OnRootViewLayout() const = 0; 2205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 2215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Overridden from NativeWidget: 2225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual internal::NativeWidgetPrivate* AsNativeWidgetPrivate() OVERRIDE; 2237d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) virtual ui::EventHandler* GetEventHandler() = 0; 2245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}; 2255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 2265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} // namespace internal 2275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} // namespace views 2285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 2295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_ 230