OLD | NEW |
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 "chrome/test/render_view_test.h" | 5 #include "chrome/test/render_view_test.h" |
6 | 6 |
7 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 7 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
8 #include "chrome/common/extensions/extension.h" | 8 #include "chrome/common/extensions/extension.h" |
9 #include "chrome/common/print_messages.h" | 9 #include "chrome/common/print_messages.h" |
10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 extension_dispatcher_)); | 118 extension_dispatcher_)); |
119 EventBindings::SetRenderThread(&render_thread_); | 119 EventBindings::SetRenderThread(&render_thread_); |
120 | 120 |
121 mock_process_.reset(new MockRenderProcess); | 121 mock_process_.reset(new MockRenderProcess); |
122 | 122 |
123 render_thread_.set_routing_id(kRouteId); | 123 render_thread_.set_routing_id(kRouteId); |
124 | 124 |
125 // This needs to pass the mock render thread to the view. | 125 // This needs to pass the mock render thread to the view. |
126 view_ = RenderView::Create(&render_thread_, | 126 view_ = RenderView::Create(&render_thread_, |
127 0, | 127 0, |
128 gfx::kNullPluginWindow, | |
129 kOpenerId, | 128 kOpenerId, |
130 RendererPreferences(), | 129 RendererPreferences(), |
131 WebPreferences(), | 130 WebPreferences(), |
132 new SharedRenderViewCounter(0), | 131 new SharedRenderViewCounter(0), |
133 kRouteId, | 132 kRouteId, |
134 kInvalidSessionStorageNamespaceId, | 133 kInvalidSessionStorageNamespaceId, |
135 string16()); | 134 string16()); |
136 | 135 |
137 // Attach a pseudo keyboard device to this object. | 136 // Attach a pseudo keyboard device to this object. |
138 mock_keyboard_.reset(new MockKeyboard()); | 137 mock_keyboard_.reset(new MockKeyboard()); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 mouse_event.x = bounds.CenterPoint().x(); | 312 mouse_event.x = bounds.CenterPoint().x(); |
314 mouse_event.y = bounds.CenterPoint().y(); | 313 mouse_event.y = bounds.CenterPoint().y(); |
315 mouse_event.clickCount = 1; | 314 mouse_event.clickCount = 1; |
316 ViewMsg_HandleInputEvent input_event(0); | 315 ViewMsg_HandleInputEvent input_event(0); |
317 scoped_ptr<IPC::Message> input_message(new ViewMsg_HandleInputEvent(0)); | 316 scoped_ptr<IPC::Message> input_message(new ViewMsg_HandleInputEvent(0)); |
318 input_message->WriteData(reinterpret_cast<const char*>(&mouse_event), | 317 input_message->WriteData(reinterpret_cast<const char*>(&mouse_event), |
319 sizeof(WebMouseEvent)); | 318 sizeof(WebMouseEvent)); |
320 view_->OnMessageReceived(*input_message); | 319 view_->OnMessageReceived(*input_message); |
321 return true; | 320 return true; |
322 } | 321 } |
OLD | NEW |