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

Unified Diff: mojo/services/window_manager/basic_focus_rules.h

Issue 698543005: Make a pure mojo::View version of the aura::Window FocusController. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Restore things lost from a deleted use_aura block in BUILD.gn files. Created 6 years, 1 month 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: mojo/services/window_manager/basic_focus_rules.h
diff --git a/mojo/services/window_manager/basic_focus_rules.h b/mojo/services/window_manager/basic_focus_rules.h
new file mode 100644
index 0000000000000000000000000000000000000000..89e0103d93c10157f6ef6753a391f195d5afd404
--- /dev/null
+++ b/mojo/services/window_manager/basic_focus_rules.h
@@ -0,0 +1,39 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_SERIVCES_WINDOW_MANAGER_BASIC_FOCUS_RULES_H_
+#define MOJO_SERIVCES_WINDOW_MANAGER_BASIC_FOCUS_RULES_H_
+
+#include "mojo/services/window_manager/focus_rules.h"
+
+namespace mojo {
+
+class WindowManagerApp;
+class View;
+
+class BasicFocusRules : public FocusRules {
sky 2014/11/10 20:45:30 Description.
+ public:
+ BasicFocusRules(mojo::WindowManagerApp* window_manager_app,
+ mojo::View* window_container);
+ ~BasicFocusRules() override;
+
+ private:
+ // Overridden from mojo::FocusRules:
+ bool IsToplevelView(mojo::View* view) const override;
+ bool CanActivateView(mojo::View* view) const override;
+ bool CanFocusView(mojo::View* view) const override;
+ mojo::View* GetToplevelView(mojo::View* view) const override;
+ mojo::View* GetActivatableView(mojo::View* view) const override;
+ mojo::View* GetFocusableView(mojo::View* view) const override;
+ mojo::View* GetNextActivatableView(mojo::View* activatable) const override;
+
+ mojo::View* window_container_;
+ mojo::WindowManagerApp* window_manager_app_;
+
+ DISALLOW_COPY_AND_ASSIGN(BasicFocusRules);
+};
+
+} // namespace mojo
+
+#endif // MOJO_SERIVCES_WINDOW_MANAGER_BASIC_FOCUS_RULES_H_

Powered by Google App Engine
This is Rietveld 408576698