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

Side by Side Diff: ui/aura/client/focus_client.cc

Issue 11299219: Rework FocusManager as FocusClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/client/focus_client.h ('k') | ui/aura/focus_change_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/aura/client/focus_client.h"
6
7 #include "ui/aura/root_window.h"
8 #include "ui/aura/window_property.h"
9
10 DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(AURA_EXPORT, aura::Window*)
11 DECLARE_WINDOW_PROPERTY_TYPE(aura::client::FocusClient*)
12
13 namespace aura {
14 namespace client {
15
16 DEFINE_WINDOW_PROPERTY_KEY(FocusClient*, kRootWindowFocusClientKey, NULL);
17
18 void SetFocusClient(RootWindow* root_window, FocusClient* client) {
19 root_window->SetProperty(kRootWindowFocusClientKey, client);
20 }
21
22 FocusClient* GetFocusClient(Window* window) {
23 return GetFocusClient(static_cast<const Window*>(window));
24 }
25
26 FocusClient* GetFocusClient(const Window* window) {
27 const RootWindow* root_window = window->GetRootWindow();
28 return root_window ?
29 root_window->GetProperty(kRootWindowFocusClientKey) : NULL;
30 }
31
32 } // namespace client
33 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/client/focus_client.h ('k') | ui/aura/focus_change_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698