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

Unified Diff: ui/aura/test/test_activation_client.h

Issue 8894018: Move the concept of Activation to the Shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | « ui/aura/root_window_observer.h ('k') | ui/aura/test/test_activation_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/test_activation_client.h
===================================================================
--- ui/aura/test/test_activation_client.h (revision 0)
+++ ui/aura/test/test_activation_client.h (revision 0)
@@ -0,0 +1,44 @@
+// Copyright (c) 2011 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 UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_
+#define UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_
+#pragma once
+
+#include "base/compiler_specific.h"
+#include "base/logging.h"
+#include "ui/aura/client/activation_client.h"
+#include "ui/aura/window_observer.h"
+
+namespace aura {
+namespace test {
+
+class TestActivationClient : public ActivationClient, public WindowObserver {
+ public:
+ TestActivationClient();
+ virtual ~TestActivationClient();
+
+ // Overridden from ActivationClient:
+ virtual void ActivateWindow(Window* window) OVERRIDE;
+ virtual void DeactivateWindow(Window* window) OVERRIDE;
+ virtual Window* GetActiveWindow() OVERRIDE;
+ virtual bool CanFocusWindow(Window* window) const OVERRIDE;
+
+ // Overridden from WindowObserver:
+ virtual void OnWindowDestroyed(Window* window) OVERRIDE;
+
+ private:
+ // This class explicitly does NOT store the active window in a window property
+ // to make sure that storing the active window in a property is not treated as
+ // part of the aura API. Assumptions to that end will cause tests that use
+ // this client to fail.
+ Window* active_window_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestActivationClient);
+};
+
+} // namespace test
+} // namespace aura
+
+#endif // UI_AURA_TEST_TEST_ACTIVATION_CLIENT_H_
Property changes on: ui\aura\test\test_activation_client.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « ui/aura/root_window_observer.h ('k') | ui/aura/test/test_activation_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698