OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 VIEWS_VIEWS_DELEGATE_H_ | 5 #ifndef VIEWS_VIEWS_DELEGATE_H_ |
6 #define VIEWS_VIEWS_DELEGATE_H_ | 6 #define VIEWS_VIEWS_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 class VIEWS_EXPORT ViewsDelegate { | 39 class VIEWS_EXPORT ViewsDelegate { |
40 public: | 40 public: |
41 // The active ViewsDelegate used by the views system. | 41 // The active ViewsDelegate used by the views system. |
42 static ViewsDelegate* views_delegate; | 42 static ViewsDelegate* views_delegate; |
43 | 43 |
44 virtual ~ViewsDelegate() {} | 44 virtual ~ViewsDelegate() {} |
45 | 45 |
46 // Gets the clipboard. | 46 // Gets the clipboard. |
47 virtual ui::Clipboard* GetClipboard() const = 0; | 47 virtual ui::Clipboard* GetClipboard() const = 0; |
48 | 48 |
49 // Returns the View that all synthetic widgets created without a specified | |
50 // parent will be parented to if they do not specify a parent in their | |
51 // InitParams, or NULL if they should have no parent. | |
52 // TODO(beng): perhaps this should be a Widget. | |
53 virtual View* GetDefaultParentView() = 0; | |
54 | |
55 // Saves the position, size and "show" state for the window with the | 49 // Saves the position, size and "show" state for the window with the |
56 // specified name. | 50 // specified name. |
57 virtual void SaveWindowPlacement(const Widget* widget, | 51 virtual void SaveWindowPlacement(const Widget* widget, |
58 const std::string& window_name, | 52 const std::string& window_name, |
59 const gfx::Rect& bounds, | 53 const gfx::Rect& bounds, |
60 ui::WindowShowState show_state) = 0; | 54 ui::WindowShowState show_state) = 0; |
61 | 55 |
62 // Retrieves the saved position and size and "show" state for the window with | 56 // Retrieves the saved position and size and "show" state for the window with |
63 // the specified name. | 57 // the specified name. |
64 virtual bool GetSavedWindowPlacement( | 58 virtual bool GetSavedWindowPlacement( |
(...skipping 23 matching lines...) Expand all Loading... |
88 virtual void AddRef() = 0; | 82 virtual void AddRef() = 0; |
89 virtual void ReleaseRef() = 0; | 83 virtual void ReleaseRef() = 0; |
90 | 84 |
91 // Converts views::Event::flags to a WindowOpenDisposition. | 85 // Converts views::Event::flags to a WindowOpenDisposition. |
92 virtual int GetDispositionForEvent(int event_flags) = 0; | 86 virtual int GetDispositionForEvent(int event_flags) = 0; |
93 }; | 87 }; |
94 | 88 |
95 } // namespace views | 89 } // namespace views |
96 | 90 |
97 #endif // VIEWS_VIEWS_DELEGATE_H_ | 91 #endif // VIEWS_VIEWS_DELEGATE_H_ |
OLD | NEW |