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

Unified Diff: aura/root_window.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 side-by-side diff with in-line comments
Download patch
Index: aura/root_window.cc
===================================================================
--- aura/root_window.cc (revision 100961)
+++ aura/root_window.cc (working copy)
@@ -1,58 +0,0 @@
-// 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.
-
-#include "aura/root_window.h"
-
-#include "base/logging.h"
-#include "aura/event.h"
-#include "aura/focus_manager.h"
-#include "aura/window_delegate.h"
-#include "ui/base/events.h"
-
-namespace aura {
-namespace internal {
-
-RootWindow::RootWindow()
- : Window(NULL),
- mouse_pressed_handler_(NULL),
- ALLOW_THIS_IN_INITIALIZER_LIST(focus_manager_(new FocusManager(this))) {
-}
-
-RootWindow::~RootWindow() {
-}
-
-bool RootWindow::HandleMouseEvent(const MouseEvent& event) {
- Window* target = mouse_pressed_handler_;
- if (!target)
- target = GetEventHandlerForPoint(event.location());
- if (event.type() == ui::ET_MOUSE_PRESSED && !mouse_pressed_handler_)
- mouse_pressed_handler_ = target;
- if (event.type() == ui::ET_MOUSE_RELEASED)
- mouse_pressed_handler_ = NULL;
- if (target->delegate()) {
- MouseEvent translated_event(event, this, target);
- return target->OnMouseEvent(&translated_event);
- }
- return false;
-}
-
-bool RootWindow::HandleKeyEvent(const KeyEvent& event) {
- Window* focused_window = GetFocusManager()->focused_window();
- if (focused_window) {
- KeyEvent translated_event(event);
- return GetFocusManager()->focused_window()->OnKeyEvent(&translated_event);
- }
- return false;
-}
-
-bool RootWindow::IsTopLevelWindowContainer() const {
- return true;
-}
-
-FocusManager* RootWindow::GetFocusManager() {
- return focus_manager_.get();
-}
-
-} // namespace internal
-} // namespace aura
« no previous file with comments | « aura/root_window.h ('k') | aura/run_all_unittests.cc » ('j') | ui/aura/aura.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698