| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef UI_VIEWS_VIEWS_DELEGATE_H_ | 5 #ifndef UI_VIEWS_VIEWS_DELEGATE_H_ |
| 6 #define UI_VIEWS_VIEWS_DELEGATE_H_ | 6 #define UI_VIEWS_VIEWS_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 namespace ui { | 24 namespace ui { |
| 25 class Clipboard; | 25 class Clipboard; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace views { | 28 namespace views { |
| 29 | 29 |
| 30 class NonClientFrameView; | 30 class NonClientFrameView; |
| 31 class View; | 31 class View; |
| 32 class Widget; | 32 class Widget; |
| 33 | 33 |
| 34 #if defined(USE_AURA) |
| 35 class NativeWidgetAura; |
| 36 class NativeWidgetHelperAura; |
| 37 #endif |
| 38 |
| 34 // ViewsDelegate is an interface implemented by an object using the views | 39 // ViewsDelegate is an interface implemented by an object using the views |
| 35 // framework. It is used to obtain various high level application utilities | 40 // framework. It is used to obtain various high level application utilities |
| 36 // and perform some actions such as window placement saving. | 41 // and perform some actions such as window placement saving. |
| 37 // | 42 // |
| 38 // The embedding app must set views_delegate to assign its ViewsDelegate | 43 // The embedding app must set views_delegate to assign its ViewsDelegate |
| 39 // implementation. | 44 // implementation. |
| 40 class VIEWS_EXPORT ViewsDelegate { | 45 class VIEWS_EXPORT ViewsDelegate { |
| 41 public: | 46 public: |
| 42 // The active ViewsDelegate used by the views system. | 47 // The active ViewsDelegate used by the views system. |
| 43 static ViewsDelegate* views_delegate; | 48 static ViewsDelegate* views_delegate; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // apply transparent window frames in the NonClientFrameView. | 94 // apply transparent window frames in the NonClientFrameView. |
| 90 virtual bool UseTransparentWindows() const = 0; | 95 virtual bool UseTransparentWindows() const = 0; |
| 91 | 96 |
| 92 // AddRef/ReleaseRef are invoked while a menu is visible. They are used to | 97 // AddRef/ReleaseRef are invoked while a menu is visible. They are used to |
| 93 // ensure we don't attempt to exit while a menu is showing. | 98 // ensure we don't attempt to exit while a menu is showing. |
| 94 virtual void AddRef() = 0; | 99 virtual void AddRef() = 0; |
| 95 virtual void ReleaseRef() = 0; | 100 virtual void ReleaseRef() = 0; |
| 96 | 101 |
| 97 // Converts views::Event::flags to a WindowOpenDisposition. | 102 // Converts views::Event::flags to a WindowOpenDisposition. |
| 98 virtual int GetDispositionForEvent(int event_flags) = 0; | 103 virtual int GetDispositionForEvent(int event_flags) = 0; |
| 104 |
| 105 #if defined(USE_AURA) |
| 106 // Creates an object that implements desktop integration behavior. Returned |
| 107 // object is owned by the NativeWidgetAura passed in. May return NULL. |
| 108 virtual NativeWidgetHelperAura* CreateNativeWidgetHelper( |
| 109 NativeWidgetAura* native_widget) = 0; |
| 110 #endif |
| 99 }; | 111 }; |
| 100 | 112 |
| 101 } // namespace views | 113 } // namespace views |
| 102 | 114 |
| 103 #endif // UI_VIEWS_VIEWS_DELEGATE_H_ | 115 #endif // UI_VIEWS_VIEWS_DELEGATE_H_ |
| OLD | NEW |