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

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

Issue 8788002: Fixes 105886 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Different approach Created 9 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
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/desktop.h" 5 #include "ui/aura/desktop.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 return false; 461 return false;
462 462
463 EventFilters filters; 463 EventFilters filters;
464 GetEventFiltersToNotify(target, &filters); 464 GetEventFiltersToNotify(target, &filters);
465 for (EventFilters::const_reverse_iterator it = filters.rbegin(); 465 for (EventFilters::const_reverse_iterator it = filters.rbegin();
466 it != filters.rend(); ++it) { 466 it != filters.rend(); ++it) {
467 if ((*it)->PreHandleMouseEvent(target, event)) 467 if ((*it)->PreHandleMouseEvent(target, event))
468 return true; 468 return true;
469 } 469 }
470 470
471 return target->delegate()->OnMouseEvent(event); 471 bool handled = false;
472 for (Window* window = target; !handled && window; window = window->parent()) {
Ben Goodger (Google) 2011/12/08 19:10:26 So, after discovering how this feature is implemen
473 if (window->delegate())
474 handled = window->delegate()->OnMouseEvent(event);
475 }
476
477 return handled;
472 } 478 }
473 479
474 bool Desktop::ProcessKeyEvent(Window* target, KeyEvent* event) { 480 bool Desktop::ProcessKeyEvent(Window* target, KeyEvent* event) {
475 if (!target->IsVisible()) 481 if (!target->IsVisible())
476 return false; 482 return false;
477 483
478 EventFilters filters; 484 EventFilters filters;
479 GetEventFiltersToNotify(target, &filters); 485 GetEventFiltersToNotify(target, &filters);
480 for (EventFilters::const_reverse_iterator it = filters.rbegin(); 486 for (EventFilters::const_reverse_iterator it = filters.rbegin();
481 it != filters.rend(); ++it) { 487 it != filters.rend(); ++it) {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) { 605 base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) {
600 bounds.set_size(gfx::Size(parsed_width, parsed_height)); 606 bounds.set_size(gfx::Size(parsed_width, parsed_height));
601 } else if (use_fullscreen_host_window_) { 607 } else if (use_fullscreen_host_window_) {
602 bounds = gfx::Rect(DesktopHost::GetNativeScreenSize()); 608 bounds = gfx::Rect(DesktopHost::GetNativeScreenSize());
603 } 609 }
604 610
605 return bounds; 611 return bounds;
606 } 612 }
607 613
608 } // namespace aura 614 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698