Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: ui/views/views_delegate.h

Issue 1159033008: Refactor ViewsDelegate singleton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/views_delegate.h
diff --git a/ui/views/views_delegate.h b/ui/views/views_delegate.h
index 39c7f5a54ea7186b1172a2f84bb16a6c72dd5bd3..119f1c839876ea05a6f93631993933dc85a44aef 100644
--- a/ui/views/views_delegate.h
+++ b/ui/views/views_delegate.h
@@ -60,6 +60,7 @@ class NativeWidgetDelegate;
// framework. It is used to obtain various high level application utilities
// and perform some actions such as window placement saving.
//
+// XXX
sadrul 2015/06/08 03:27:43 ?
mohsen 2015/06/08 19:27:34 Sorry! This was here to remind me to update the co
// The embedding app must set views_delegate to assign its ViewsDelegate
// implementation.
class VIEWS_EXPORT ViewsDelegate {
@@ -73,9 +74,10 @@ class VIEWS_EXPORT ViewsDelegate {
};
#endif
- ViewsDelegate();
virtual ~ViewsDelegate();
+ static ViewsDelegate* GetInstance();
sadrul 2015/06/08 03:27:43 Clarify here that GetInstance() can return null if
mohsen 2015/06/08 19:27:34 Done.
+
// Saves the position, size and "show" state for the window with the
// specified name.
virtual void SaveWindowPlacement(const Widget* widget,
@@ -160,8 +162,8 @@ class VIEWS_EXPORT ViewsDelegate {
// Returns a blocking pool task runner given a TaskRunnerType.
virtual scoped_refptr<base::TaskRunner> GetBlockingPoolTaskRunner();
- // The active ViewsDelegate used by the views system.
- static ViewsDelegate* views_delegate;
+ protected:
+ ViewsDelegate();
private:
scoped_ptr<ViewsTouchEditingControllerFactory> views_tsc_factory_;

Powered by Google App Engine
This is Rietveld 408576698