OLD | NEW |
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 "content/browser/renderer_host/render_widget_host_view_mac.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h" |
6 | 6 |
7 #include "base/mac/mac_util.h" | 7 #include "base/mac/mac_util.h" |
8 #include "base/mac/scoped_nsautorelease_pool.h" | 8 #include "base/mac/scoped_nsautorelease_pool.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "content/browser/browser_thread_impl.h" | 10 #include "content/browser/browser_thread_impl.h" |
11 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 11 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
12 #include "content/browser/renderer_host/test_render_view_host.h" | 12 #include "content/browser/renderer_host/test_render_view_host.h" |
13 #include "content/common/gpu/gpu_messages.h" | 13 #include "content/common/gpu/gpu_messages.h" |
14 #include "content/common/input_messages.h" | 14 #include "content/common/input_messages.h" |
15 #include "content/common/view_messages.h" | 15 #include "content/common/view_messages.h" |
16 #include "content/public/browser/notification_types.h" | 16 #include "content/public/browser/notification_types.h" |
17 #include "content/public/browser/render_widget_host_view_mac_delegate.h" | 17 #include "content/public/browser/render_widget_host_view_mac_delegate.h" |
18 #include "content/public/test/mock_render_process_host.h" | 18 #include "content/public/test/mock_render_process_host.h" |
19 #include "content/public/test/test_browser_context.h" | 19 #include "content/public/test/test_browser_context.h" |
20 #include "content/public/test/test_utils.h" | 20 #include "content/public/test/test_utils.h" |
21 #include "testing/gmock/include/gmock/gmock.h" | 21 #include "testing/gmock/include/gmock/gmock.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 #include "ui/base/test/cocoa_test_event_utils.h" | 23 #include "ui/base/test/cocoa_test_event_utils.h" |
24 #import "ui/base/test/ui_cocoa_test_helper.h" | 24 #import "ui/base/test/ui_cocoa_test_helper.h" |
25 #include "webkit/plugins/npapi/webplugin.h" | |
26 | 25 |
27 // Declare things that are part of the 10.7 SDK. | 26 // Declare things that are part of the 10.7 SDK. |
28 #if !defined(MAC_OS_X_VERSION_10_7) || \ | 27 #if !defined(MAC_OS_X_VERSION_10_7) || \ |
29 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 | 28 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 |
30 enum { | 29 enum { |
31 NSEventPhaseNone = 0, // event not associated with a phase. | 30 NSEventPhaseNone = 0, // event not associated with a phase. |
32 NSEventPhaseBegan = 0x1 << 0, | 31 NSEventPhaseBegan = 0x1 << 0, |
33 NSEventPhaseStationary = 0x1 << 1, | 32 NSEventPhaseStationary = 0x1 << 1, |
34 NSEventPhaseChanged = 0x1 << 2, | 33 NSEventPhaseChanged = 0x1 << 2, |
35 NSEventPhaseEnded = 0x1 << 3, | 34 NSEventPhaseEnded = 0x1 << 3, |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 host->OnMessageReceived(*response2); | 773 host->OnMessageReceived(*response2); |
775 | 774 |
776 // Check that the view delegate ignored the empty unhandled wheel event. | 775 // Check that the view delegate ignored the empty unhandled wheel event. |
777 ASSERT_EQ(NO, view_delegate.get().unhandledWheelEventReceived); | 776 ASSERT_EQ(NO, view_delegate.get().unhandledWheelEventReceived); |
778 | 777 |
779 // Clean up. | 778 // Clean up. |
780 host->Shutdown(); | 779 host->Shutdown(); |
781 } | 780 } |
782 | 781 |
783 } // namespace content | 782 } // namespace content |
OLD | NEW |