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

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

Issue 9958036: aura: Add RootWindowObserver::OnKeyboardMappingChanged(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 8 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 | « ui/aura/root_window.h ('k') | ui/aura/root_window_host_linux.cc » ('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) 2012 The Chromium Authors. All rights reserved. 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 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 <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 } 348 }
349 349
350 void RootWindow::OnWindowTransformed(Window* window, bool contained_mouse) { 350 void RootWindow::OnWindowTransformed(Window* window, bool contained_mouse) {
351 if (contained_mouse || 351 if (contained_mouse ||
352 (window->IsVisible() && 352 (window->IsVisible() &&
353 window->ContainsPointInRoot(last_mouse_location_))) { 353 window->ContainsPointInRoot(last_mouse_location_))) {
354 PostMouseMoveEventAfterWindowChange(); 354 PostMouseMoveEventAfterWindowChange();
355 } 355 }
356 } 356 }
357 357
358 void RootWindow::OnKeyboardMappingChanged() {
359 FOR_EACH_OBSERVER(RootWindowObserver, observers_,
360 OnKeyboardMappingChanged(this));
361 }
362
358 void RootWindow::AddRootWindowObserver(RootWindowObserver* observer) { 363 void RootWindow::AddRootWindowObserver(RootWindowObserver* observer) {
359 observers_.AddObserver(observer); 364 observers_.AddObserver(observer);
360 } 365 }
361 366
362 void RootWindow::RemoveRootWindowObserver(RootWindowObserver* observer) { 367 void RootWindow::RemoveRootWindowObserver(RootWindowObserver* observer) {
363 observers_.RemoveObserver(observer); 368 observers_.RemoveObserver(observer);
364 } 369 }
365 370
366 void RootWindow::PostNativeEvent(const base::NativeEvent& native_event) { 371 void RootWindow::PostNativeEvent(const base::NativeEvent& native_event) {
367 #if !defined(OS_MACOSX) 372 #if !defined(OS_MACOSX)
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 void RootWindow::UnlockCompositor() { 878 void RootWindow::UnlockCompositor() {
874 DCHECK(compositor_lock_); 879 DCHECK(compositor_lock_);
875 compositor_lock_ = NULL; 880 compositor_lock_ = NULL;
876 if (draw_on_compositor_unlock_) { 881 if (draw_on_compositor_unlock_) {
877 draw_on_compositor_unlock_ = false; 882 draw_on_compositor_unlock_ = false;
878 ScheduleDraw(); 883 ScheduleDraw();
879 } 884 }
880 } 885 }
881 886
882 } // namespace aura 887 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/root_window.h ('k') | ui/aura/root_window_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698