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

Side by Side Diff: ui/base/test/ui_controls_mac.mm

Issue 19629002: Use a direct include of the message_loop header in ui/, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/base/test/ui_controls_internal_win.cc ('k') | ui/base/test/ui_controls_win.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/base/test/ui_controls.h" 5 #include "ui/base/test/ui_controls.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <mach/mach_time.h> 8 #include <mach/mach_time.h>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "ui/base/keycodes/keyboard_code_conversion_mac.h" 14 #include "ui/base/keycodes/keyboard_code_conversion_mac.h"
15 15
16 16
17 // Implementation details: We use [NSApplication sendEvent:] instead 17 // Implementation details: We use [NSApplication sendEvent:] instead
18 // of [NSApplication postEvent:atStart:] so that the event gets sent 18 // of [NSApplication postEvent:atStart:] so that the event gets sent
19 // immediately. This lets us run the post-event task right 19 // immediately. This lets us run the post-event task right
20 // immediately as well. Unfortunately I cannot subclass NSEvent (it's 20 // immediately as well. Unfortunately I cannot subclass NSEvent (it's
21 // probably a class cluster) to allow other easy answers. For 21 // probably a class cluster) to allow other easy answers. For
22 // example, if I could subclass NSEvent, I could run the Task in it's 22 // example, if I could subclass NSEvent, I could run the Task in it's
23 // dealloc routine (which necessarily happens after the event is 23 // dealloc routine (which necessarily happens after the event is
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 return true; 365 return true;
366 } 366 }
367 367
368 bool SendMouseClick(MouseButton type) { 368 bool SendMouseClick(MouseButton type) {
369 CHECK(g_ui_controls_enabled); 369 CHECK(g_ui_controls_enabled);
370 return SendMouseEventsNotifyWhenDone(type, UP|DOWN, base::Closure()); 370 return SendMouseEventsNotifyWhenDone(type, UP|DOWN, base::Closure());
371 } 371 }
372 372
373 } // namespace ui_controls 373 } // namespace ui_controls
OLDNEW
« no previous file with comments | « ui/base/test/ui_controls_internal_win.cc ('k') | ui/base/test/ui_controls_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698