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

Side by Side Diff: ui/aura/focus_manager.cc

Issue 7886042: Move Aura to UI subdir. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 months 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "aura/focus_manager.h" 5 #include "ui/aura/focus_manager.h"
6 6
7 #include "aura/window.h" 7 #include "ui/aura/window.h"
8 #include "aura/window_delegate.h" 8 #include "ui/aura/window_delegate.h"
9 9
10 namespace aura { 10 namespace aura {
11 namespace internal { 11 namespace internal {
12 12
13 FocusManager::FocusManager(Window* owner) 13 FocusManager::FocusManager(Window* owner)
14 : owner_(owner), 14 : owner_(owner),
15 focused_window_(NULL) { 15 focused_window_(NULL) {
16 } 16 }
17 17
18 FocusManager::~FocusManager() { 18 FocusManager::~FocusManager() {
19 } 19 }
20 20
21 void FocusManager::SetFocusedWindow(Window* focused_window) { 21 void FocusManager::SetFocusedWindow(Window* focused_window) {
22 if (focused_window == focused_window_) 22 if (focused_window == focused_window_)
23 return; 23 return;
24 if (focused_window_) 24 if (focused_window_)
25 focused_window_->delegate()->OnBlur(); 25 focused_window_->delegate()->OnBlur();
26 focused_window_ = focused_window; 26 focused_window_ = focused_window;
27 if (focused_window_) 27 if (focused_window_)
28 focused_window_->delegate()->OnFocus(); 28 focused_window_->delegate()->OnFocus();
29 } 29 }
30 30
31 } // namespace internal 31 } // namespace internal
32 } // namespace aura 32 } // namespace aura
OLDNEW
« ui/aura/aura.gyp ('K') | « ui/aura/focus_manager.h ('k') | ui/aura/hit_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698