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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // specify their own. If this function returns NULL, the | 89 // specify their own. If this function returns NULL, the |
90 // views::CustomFrameView type will be used. | 90 // views::CustomFrameView type will be used. |
91 virtual NonClientFrameView* CreateDefaultNonClientFrameView( | 91 virtual NonClientFrameView* CreateDefaultNonClientFrameView( |
92 Widget* widget) = 0; | 92 Widget* widget) = 0; |
93 | 93 |
94 // Returns whether the embedding app wants windows to be created with the | 94 // Returns whether the embedding app wants windows to be created with the |
95 // views::Widget marked as transparent. For example, an app may wish to | 95 // views::Widget marked as transparent. For example, an app may wish to |
96 // apply transparent window frames in the NonClientFrameView. | 96 // apply transparent window frames in the NonClientFrameView. |
97 virtual bool UseTransparentWindows() const = 0; | 97 virtual bool UseTransparentWindows() const = 0; |
98 | 98 |
| 99 // Sets whether this ViewsDelegate should respond to AddRef/ReleaseRef calls. |
| 100 // Can be used if there is a part of the application lifecycle during which |
| 101 virtual void SetRefCounting(bool is_ref_counting) = 0; |
| 102 |
99 // AddRef/ReleaseRef are invoked while a menu is visible. They are used to | 103 // AddRef/ReleaseRef are invoked while a menu is visible. They are used to |
100 // ensure we don't attempt to exit while a menu is showing. | 104 // ensure we don't attempt to exit while a menu is showing. |
101 virtual void AddRef() = 0; | 105 virtual void AddRef() = 0; |
102 virtual void ReleaseRef() = 0; | 106 virtual void ReleaseRef() = 0; |
103 | 107 |
104 // Creates a web contents. This will return NULL unless overriden. | 108 // Creates a web contents. This will return NULL unless overriden. |
105 virtual content::WebContents* CreateWebContents( | 109 virtual content::WebContents* CreateWebContents( |
106 content::BrowserContext* browser_context, | 110 content::BrowserContext* browser_context, |
107 content::SiteInstance* site_instance) = 0; | 111 content::SiteInstance* site_instance) = 0; |
108 | 112 |
109 // Gives the platform a chance to modify the properties of a Widget. | 113 // Gives the platform a chance to modify the properties of a Widget. |
110 virtual void OnBeforeWidgetInit(Widget::InitParams* params, | 114 virtual void OnBeforeWidgetInit(Widget::InitParams* params, |
111 internal::NativeWidgetDelegate* delegate) = 0; | 115 internal::NativeWidgetDelegate* delegate) = 0; |
112 | 116 |
113 private: | 117 private: |
114 scoped_ptr<ViewsTouchSelectionControllerFactory> views_tsc_factory_; | 118 scoped_ptr<ViewsTouchSelectionControllerFactory> views_tsc_factory_; |
115 }; | 119 }; |
116 | 120 |
117 } // namespace views | 121 } // namespace views |
118 | 122 |
119 #endif // UI_VIEWS_VIEWS_DELEGATE_H_ | 123 #endif // UI_VIEWS_VIEWS_DELEGATE_H_ |
OLD | NEW |