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

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

Issue 8120014: Add a lock screen example. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
« no previous file with comments | « no previous file | ui/aura/window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "ui/aura/desktop.h" 9 #include "ui/aura/desktop.h"
10 #include "ui/aura/event.h" 10 #include "ui/aura/event.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 MouseEvent translated_event(event, this, target); 50 MouseEvent translated_event(event, this, target);
51 return target->OnMouseEvent(&translated_event); 51 return target->OnMouseEvent(&translated_event);
52 } 52 }
53 return false; 53 return false;
54 } 54 }
55 55
56 bool RootWindow::HandleKeyEvent(const KeyEvent& event) { 56 bool RootWindow::HandleKeyEvent(const KeyEvent& event) {
57 Window* focused_window = GetFocusManager()->focused_window(); 57 Window* focused_window = GetFocusManager()->focused_window();
58 if (focused_window) { 58 if (focused_window) {
59 KeyEvent translated_event(event); 59 KeyEvent translated_event(event);
60 return GetFocusManager()->focused_window()->OnKeyEvent(&translated_event); 60 return focused_window->OnKeyEvent(&translated_event);
61 } 61 }
62 return false; 62 return false;
63 } 63 }
64 64
65 void RootWindow::SetCapture(Window* window) { 65 void RootWindow::SetCapture(Window* window) {
66 if (capture_window_ == window) 66 if (capture_window_ == window)
67 return; 67 return;
68 68
69 if (capture_window_ && capture_window_->delegate()) 69 if (capture_window_ && capture_window_->delegate())
70 capture_window_->delegate()->OnCaptureLost(); 70 capture_window_->delegate()->OnCaptureLost();
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // Send an entered event. 127 // Send an entered event.
128 if (mouse_moved_handler_ && mouse_moved_handler_->delegate()) { 128 if (mouse_moved_handler_ && mouse_moved_handler_->delegate()) {
129 MouseEvent translated_event(event, this, mouse_moved_handler_, 129 MouseEvent translated_event(event, this, mouse_moved_handler_,
130 ui::ET_MOUSE_ENTERED); 130 ui::ET_MOUSE_ENTERED);
131 mouse_moved_handler_->OnMouseEvent(&translated_event); 131 mouse_moved_handler_->OnMouseEvent(&translated_event);
132 } 132 }
133 } 133 }
134 134
135 } // namespace internal 135 } // namespace internal
136 } // namespace aura 136 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | ui/aura/window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698