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

Unified Diff: ui/views/focus/focus_manager_factory.h

Issue 2953243002: FocusManagerFactory::Create() should return a unique_ptr. (Closed)
Patch Set: build Created 3 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
« no previous file with comments | « ash/accelerators/ash_focus_manager_factory.cc ('k') | ui/views/focus/focus_manager_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/focus/focus_manager_factory.h
diff --git a/ui/views/focus/focus_manager_factory.h b/ui/views/focus/focus_manager_factory.h
index ac90a7b84c1b509eb941640cf00450774a19c238..9b17a8cbec78df5a5c895c7fe9fa5e65aeae2abc 100644
--- a/ui/views/focus/focus_manager_factory.h
+++ b/ui/views/focus/focus_manager_factory.h
@@ -5,6 +5,8 @@
#ifndef UI_VIEWS_FOCUS_FOCUS_MANAGER_FACTORY_H_
#define UI_VIEWS_FOCUS_FOCUS_MANAGER_FACTORY_H_
+#include <memory>
+
#include "base/macros.h"
#include "ui/views/views_export.h"
@@ -17,8 +19,9 @@ class Widget;
// to inject a custom factory.
class VIEWS_EXPORT FocusManagerFactory {
public:
- // Create a FocusManager for the given |widget| using installe Factory.
- static FocusManager* Create(Widget* widget, bool desktop_widget);
+ // Create a FocusManager for the given |widget| using the installed Factory.
+ static std::unique_ptr<FocusManager> Create(Widget* widget,
+ bool desktop_widget);
// Installs FocusManagerFactory. If |factory| is NULL, it resets
// to the default factory which creates plain FocusManager.
@@ -31,8 +34,9 @@ class VIEWS_EXPORT FocusManagerFactory {
// Create a FocusManager for the given |widget|.
// The |desktop_widget| bool is true for widgets created in the desktop and
// false for widgets created in the shell.
- virtual FocusManager* CreateFocusManager(Widget* widget,
- bool desktop_widget) = 0;
+ virtual std::unique_ptr<FocusManager> CreateFocusManager(
+ Widget* widget,
+ bool desktop_widget) = 0;
private:
DISALLOW_COPY_AND_ASSIGN(FocusManagerFactory);
« no previous file with comments | « ash/accelerators/ash_focus_manager_factory.cc ('k') | ui/views/focus/focus_manager_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698