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

Unified Diff: services/window_manager/focus_controller.h

Issue 788453002: Put code in //services/window_manager in namespace window_manager (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « services/window_manager/basic_focus_rules.cc ('k') | services/window_manager/focus_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/window_manager/focus_controller.h
diff --git a/services/window_manager/focus_controller.h b/services/window_manager/focus_controller.h
index cfcf45b43df04d6430466a80a6fad45901ed08cc..b9bddb20ce76aa210fd8f019c49809acf5d33ad7 100644
--- a/services/window_manager/focus_controller.h
+++ b/services/window_manager/focus_controller.h
@@ -12,7 +12,7 @@
#include "mojo/services/public/cpp/view_manager/view_observer.h"
#include "ui/events/event_handler.h"
-namespace mojo {
+namespace window_manager {
class FocusControllerObserver;
class FocusRules;
@@ -21,8 +21,7 @@ class FocusRules;
// manager. Within the window manager, there can only be one focused and one
// active window at a time. When focus or activation changes, notifications are
// sent using the FocusControllerObserver interface.
-class FocusController : public ui::EventHandler,
- public ViewObserver {
+class FocusController : public ui::EventHandler, public mojo::ViewObserver {
public:
// |rules| cannot be null.
explicit FocusController(scoped_ptr<FocusRules> rules);
@@ -31,17 +30,17 @@ class FocusController : public ui::EventHandler,
void AddObserver(FocusControllerObserver* observer);
void RemoveObserver(FocusControllerObserver* observer);
- void ActivateView(View* view);
- void DeactivateView(View* view);
- View* GetActiveView();
- View* GetActivatableView(View* view);
- View* GetToplevelView(View* view);
- bool CanActivateView(View* view) const;
+ void ActivateView(mojo::View* view);
+ void DeactivateView(mojo::View* view);
+ mojo::View* GetActiveView();
+ mojo::View* GetActivatableView(mojo::View* view);
+ mojo::View* GetToplevelView(mojo::View* view);
+ bool CanActivateView(mojo::View* view) const;
- void FocusView(View* view);
+ void FocusView(mojo::View* view);
- void ResetFocusWithinActiveView(View* view);
- View* GetFocusedView();
+ void ResetFocusWithinActiveView(mojo::View* view);
+ mojo::View* GetFocusedView();
// Overridden from ui::EventHandler:
void OnKeyEvent(ui::KeyEvent* event) override;
@@ -53,13 +52,13 @@ class FocusController : public ui::EventHandler,
// Overridden from ViewObserver:
void OnTreeChanging(const TreeChangeParams& params) override;
void OnTreeChanged(const TreeChangeParams& params) override;
- void OnViewVisibilityChanged(View* view) override;
- void OnViewDestroying(View* view) override;
+ void OnViewVisibilityChanged(mojo::View* view) override;
+ void OnViewDestroying(mojo::View* view) override;
private:
// Internal implementation that sets the focused view, fires events etc.
// This function must be called with a valid focusable view.
- void SetFocusedView(View* view);
+ void SetFocusedView(mojo::View* view);
// Internal implementation that sets the active window, fires events etc.
// This function must be called with a valid |activatable_window|.
@@ -67,21 +66,20 @@ class FocusController : public ui::EventHandler,
// request (e.g. FocusWindow or ActivateWindow). It may be null, e.g. if
// SetActiveWindow was not called by an external request. |activatable_window|
// refers to the actual window to be activated, which may be different.
- void SetActiveView(View* requested_view,
- View* activatable_view);
+ void SetActiveView(mojo::View* requested_view, mojo::View* activatable_view);
// Called when a window's disposition changed such that it and its hierarchy
// are no longer focusable/activatable. |next| is a valid window that is used
// as a starting point for finding a window to focus next based on rules.
- void ViewLostFocusFromDispositionChange(View* view, View* next);
+ void ViewLostFocusFromDispositionChange(mojo::View* view, mojo::View* next);
// Called when an attempt is made to focus or activate a window via an input
// event targeted at that window. Rules determine the best focusable window
// for the input window.
- void ViewFocusedFromInputEvent(View* view);
+ void ViewFocusedFromInputEvent(mojo::View* view);
- View* active_view_;
- View* focused_view_;
+ mojo::View* active_view_;
+ mojo::View* focused_view_;
bool updating_focus_;
bool updating_activation_;
@@ -90,15 +88,15 @@ class FocusController : public ui::EventHandler,
ObserverList<FocusControllerObserver> focus_controller_observers_;
- ScopedObserver<View, ViewObserver> observer_manager_;
+ ScopedObserver<mojo::View, ViewObserver> observer_manager_;
DISALLOW_COPY_AND_ASSIGN(FocusController);
};
// Sets/Gets the focus controller for a root view.
-void SetFocusController(View* view, FocusController* focus_controller);
-FocusController* GetFocusController(View* view);
+void SetFocusController(mojo::View* view, FocusController* focus_controller);
+FocusController* GetFocusController(mojo::View* view);
-} // namespace mojo
+} // namespace window_manager
#endif // SERVICES_WINDOW_MANAGER_FOCUS_CONTROLLER_H_
« no previous file with comments | « services/window_manager/basic_focus_rules.cc ('k') | services/window_manager/focus_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698