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 #ifndef CONTENT_TEST_RENDER_VIEW_TEST_H_ | 5 #ifndef CONTENT_TEST_RENDER_VIEW_TEST_H_ |
6 #define CONTENT_TEST_RENDER_VIEW_TEST_H_ | 6 #define CONTENT_TEST_RENDER_VIEW_TEST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // Loads the given HTML into the main frame as a data: URL. | 73 // Loads the given HTML into the main frame as a data: URL. |
74 void LoadHTML(const char* html); | 74 void LoadHTML(const char* html); |
75 | 75 |
76 // Sends IPC messages that emulates a key-press event. | 76 // Sends IPC messages that emulates a key-press event. |
77 int SendKeyEvent(MockKeyboard::Layout layout, | 77 int SendKeyEvent(MockKeyboard::Layout layout, |
78 int key_code, | 78 int key_code, |
79 MockKeyboard::Modifiers key_modifiers, | 79 MockKeyboard::Modifiers key_modifiers, |
80 string16* output); | 80 string16* output); |
81 | 81 |
82 // Sends one native key event over IPC. | 82 // Sends one native key event over IPC. |
83 void SendNativeKeyEvent(const NativeWebKeyboardEvent& key_event); | 83 void SendNativeKeyEvent(const content::NativeWebKeyboardEvent& key_event); |
84 | 84 |
85 // Send a raw keyboard event to the renderer. | 85 // Send a raw keyboard event to the renderer. |
86 void SendWebKeyboardEvent(const WebKit::WebKeyboardEvent& key_event); | 86 void SendWebKeyboardEvent(const WebKit::WebKeyboardEvent& key_event); |
87 | 87 |
88 // Send a raw mouse event to the renderer. | 88 // Send a raw mouse event to the renderer. |
89 void SendWebMouseEvent(const WebKit::WebMouseEvent& key_event); | 89 void SendWebMouseEvent(const WebKit::WebMouseEvent& key_event); |
90 | 90 |
91 // Returns the bounds (coordinates and size) of the element with id | 91 // Returns the bounds (coordinates and size) of the element with id |
92 // |element_id|. Returns an empty rect if such an element was not found. | 92 // |element_id|. Returns an empty rect if such an element was not found. |
93 gfx::Rect GetElementBounds(const std::string& element_id); | 93 gfx::Rect GetElementBounds(const std::string& element_id); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 132 |
133 // Used to setup the process so renderers can run. | 133 // Used to setup the process so renderers can run. |
134 scoped_ptr<RendererMainPlatformDelegate> platform_; | 134 scoped_ptr<RendererMainPlatformDelegate> platform_; |
135 scoped_ptr<content::MainFunctionParams> params_; | 135 scoped_ptr<content::MainFunctionParams> params_; |
136 scoped_ptr<CommandLine> command_line_; | 136 scoped_ptr<CommandLine> command_line_; |
137 }; | 137 }; |
138 | 138 |
139 } // namespace content | 139 } // namespace content |
140 | 140 |
141 #endif // CONTENT_TEST_RENDER_VIEW_TEST_H_ | 141 #endif // CONTENT_TEST_RENDER_VIEW_TEST_H_ |
OLD | NEW |