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

Side by Side Diff: ui/aura/test/event_generator_delegate_aura.cc

Issue 793003004: MacViews: Implement event monitoring for a specific window (Reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Created 6 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
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller.cc ('k') | ui/events/test/event_generator.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/test/event_generator_delegate_aura.h" 5 #include "ui/aura/test/event_generator_delegate_aura.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "ui/aura/client/screen_position_client.h" 8 #include "ui/aura/client/screen_position_client.h"
9 #include "ui/aura/window_event_dispatcher.h" 9 #include "ui/aura/window_event_dispatcher.h"
10 #include "ui/aura/window_tree_host.h" 10 #include "ui/aura/window_tree_host.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 EventGeneratorDelegateAura::EventGeneratorDelegateAura() { 67 EventGeneratorDelegateAura::EventGeneratorDelegateAura() {
68 } 68 }
69 69
70 EventGeneratorDelegateAura::~EventGeneratorDelegateAura() { 70 EventGeneratorDelegateAura::~EventGeneratorDelegateAura() {
71 } 71 }
72 72
73 ui::EventTarget* EventGeneratorDelegateAura::GetTargetAt( 73 ui::EventTarget* EventGeneratorDelegateAura::GetTargetAt(
74 const gfx::Point& location) { 74 const gfx::Point& location) {
75 // TODO(andresantoso): Add support for EventGenerator::targeting_application()
76 // if needed for Ash.
75 return GetHostAt(location)->window(); 77 return GetHostAt(location)->window();
76 } 78 }
77 79
78 ui::EventSource* EventGeneratorDelegateAura::GetEventSource( 80 ui::EventSource* EventGeneratorDelegateAura::GetEventSource(
79 ui::EventTarget* target) { 81 ui::EventTarget* target) {
80 return static_cast<Window*>(target)->GetHost()->GetEventSource(); 82 return static_cast<Window*>(target)->GetHost()->GetEventSource();
81 } 83 }
82 84
83 gfx::Point EventGeneratorDelegateAura::CenterOfTarget( 85 gfx::Point EventGeneratorDelegateAura::CenterOfTarget(
84 const ui::EventTarget* target) const { 86 const ui::EventTarget* target) const {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 121
120 void EventGeneratorDelegateAura::ConvertPointFromHost( 122 void EventGeneratorDelegateAura::ConvertPointFromHost(
121 const ui::EventTarget* hosted_target, 123 const ui::EventTarget* hosted_target,
122 gfx::Point* point) const { 124 gfx::Point* point) const {
123 const Window* window = WindowFromTarget(hosted_target); 125 const Window* window = WindowFromTarget(hosted_target);
124 window->GetHost()->ConvertPointFromHost(point); 126 window->GetHost()->ConvertPointFromHost(point);
125 } 127 }
126 128
127 } // namespace test 129 } // namespace test
128 } // namespace aura 130 } // namespace aura
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller.cc ('k') | ui/events/test/event_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698