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

Side by Side Diff: ui/views/test/views_test_helper_mac.mm

Issue 789763002: MacViews: Implement capture using NSEvent local+global monitors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20140812-MacViews-LAYERS2-PRESQUASH
Patch Set: fix sorting 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 | « ui/views/cocoa/cocoa_mouse_capture_unittest.mm ('k') | ui/views/views.gyp » ('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/views/test/views_test_helper_mac.h" 5 #include "ui/views/test/views_test_helper_mac.h"
6 6
7 #import <Cocoa/Cocoa.h>
8
7 #include "ui/compositor/scoped_animation_duration_scale_mode.h" 9 #include "ui/compositor/scoped_animation_duration_scale_mode.h"
8 #include "ui/views/test/event_generator_delegate_mac.h" 10 #include "ui/views/test/event_generator_delegate_mac.h"
9 11
10 namespace views { 12 namespace views {
11 13
12 // static 14 // static
13 ViewsTestHelper* ViewsTestHelper::Create(base::MessageLoopForUI* message_loop, 15 ViewsTestHelper* ViewsTestHelper::Create(base::MessageLoopForUI* message_loop,
14 ui::ContextFactory* context_factory) { 16 ui::ContextFactory* context_factory) {
15 return new ViewsTestHelperMac; 17 return new ViewsTestHelperMac;
16 } 18 }
17 19
18 ViewsTestHelperMac::ViewsTestHelperMac() 20 ViewsTestHelperMac::ViewsTestHelperMac()
19 : zero_duration_mode_(new ui::ScopedAnimationDurationScaleMode( 21 : zero_duration_mode_(new ui::ScopedAnimationDurationScaleMode(
20 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)) { 22 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)) {
21 test::InitializeMacEventGeneratorDelegate(); 23 test::InitializeMacEventGeneratorDelegate();
24
25 // Unbundled applications (those without Info.plist) default to
26 // NSApplicationActivationPolicyProhibited, which prohibits the application
27 // obtaining key status or activating windows without user interaction.
28 [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
22 } 29 }
23 30
24 ViewsTestHelperMac::~ViewsTestHelperMac() { 31 ViewsTestHelperMac::~ViewsTestHelperMac() {
25 } 32 }
26 33
27 } // namespace views 34 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/cocoa/cocoa_mouse_capture_unittest.mm ('k') | ui/views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698