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

Unified Diff: sky/tools/debugger/focus_rules.h

Issue 718573002: Revert "Remove aura and make a pure mojo::View version of the aura::Window FocusController." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « sky/tools/debugger/debugger.cc ('k') | sky/tools/debugger/focus_rules.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/debugger/focus_rules.h
diff --git a/sky/tools/debugger/focus_rules.h b/sky/tools/debugger/focus_rules.h
new file mode 100644
index 0000000000000000000000000000000000000000..fa5a91974fa7c60e4b134b2721e92ec339109d2a
--- /dev/null
+++ b/sky/tools/debugger/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 SKY_TOOLS_DEBUGGER_FOCUS_RULES_H_
+#define SKY_TOOLS_DEBUGGER_FOCUS_RULES_H_
+
+#include "mojo/services/window_manager/window_manager_app.h"
+#include "ui/aura/window.h"
+#include "ui/wm/core/focus_rules.h"
+
+namespace sky {
+namespace debugger {
+
+class FocusRules : public wm::FocusRules {
+ public:
+ FocusRules(mojo::WindowManagerApp* window_manager_app, mojo::View* content);
+ virtual ~FocusRules();
+
+ private:
+ // Overridden from wm::FocusRules:
+ bool IsToplevelWindow(aura::Window* window) const override;
+ bool CanActivateWindow(aura::Window* window) const override;
+ bool CanFocusWindow(aura::Window* window) const override;
+ aura::Window* GetToplevelWindow(aura::Window* window) const override;
+ aura::Window* GetActivatableWindow(aura::Window* window) const override;
+ aura::Window* GetFocusableWindow(aura::Window* window) const override;
+ aura::Window* GetNextActivatableWindow(aura::Window* ignore) const override;
+
+ mojo::View* content_;
+ mojo::WindowManagerApp* window_manager_app_;
+
+ DISALLOW_COPY_AND_ASSIGN(FocusRules);
+};
+
+} // namespace debugger
+} // namespace sky
+
+#endif // SKY_TOOLS_DEBUGGER_FOCUS_RULES_H_
« no previous file with comments | « sky/tools/debugger/debugger.cc ('k') | sky/tools/debugger/focus_rules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698