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_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // or the keyboard layout. | 159 // or the keyboard layout. |
160 void SimulateKeyPress(WebContents* web_contents, | 160 void SimulateKeyPress(WebContents* web_contents, |
161 ui::DomKey key, | 161 ui::DomKey key, |
162 ui::DomCode code, | 162 ui::DomCode code, |
163 ui::KeyboardCode key_code, | 163 ui::KeyboardCode key_code, |
164 bool control, | 164 bool control, |
165 bool shift, | 165 bool shift, |
166 bool alt, | 166 bool alt, |
167 bool command); | 167 bool command); |
168 | 168 |
| 169 // Method to check what devices we have on the system. |
| 170 bool IsWebcamAvailableOnSystem(WebContents* web_contents); |
| 171 |
169 // Allow ExecuteScript* methods to target either a WebContents or a | 172 // Allow ExecuteScript* methods to target either a WebContents or a |
170 // RenderFrameHost. Targetting a WebContents means executing the script in the | 173 // RenderFrameHost. Targetting a WebContents means executing the script in the |
171 // RenderFrameHost returned by WebContents::GetMainFrame(), which is the main | 174 // RenderFrameHost returned by WebContents::GetMainFrame(), which is the main |
172 // frame. Pass a specific RenderFrameHost to target it. Embedders may declare | 175 // frame. Pass a specific RenderFrameHost to target it. Embedders may declare |
173 // additional ConvertToRenderFrameHost functions for convenience. | 176 // additional ConvertToRenderFrameHost functions for convenience. |
174 class ToRenderFrameHost { | 177 class ToRenderFrameHost { |
175 public: | 178 public: |
176 template <typename T> | 179 template <typename T> |
177 ToRenderFrameHost(T* frame_convertible_value) | 180 ToRenderFrameHost(T* frame_convertible_value) |
178 : render_frame_host_(ConvertToRenderFrameHost(frame_convertible_value)) {} | 181 : render_frame_host_(ConvertToRenderFrameHost(frame_convertible_value)) {} |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 scoped_refptr<MessageLoopRunner> did_finish_loop_runner_; | 643 scoped_refptr<MessageLoopRunner> did_finish_loop_runner_; |
641 | 644 |
642 base::WeakPtrFactory<TestNavigationManager> weak_factory_; | 645 base::WeakPtrFactory<TestNavigationManager> weak_factory_; |
643 | 646 |
644 DISALLOW_COPY_AND_ASSIGN(TestNavigationManager); | 647 DISALLOW_COPY_AND_ASSIGN(TestNavigationManager); |
645 }; | 648 }; |
646 | 649 |
647 } // namespace content | 650 } // namespace content |
648 | 651 |
649 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 652 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
OLD | NEW |