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

Side by Side Diff: content/test/test_render_view_host.h

Issue 1202593002: Move browser-to-renderer opener plumbing to frame routing IDs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@opener-create-opener-render-views
Patch Set: Remove suppress_opener Created 5 years, 5 months 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 | « content/test/data/post_message.html ('k') | content/test/test_render_view_host.cc » ('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 (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_TEST_RENDER_VIEW_HOST_H_ 5 #ifndef CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_
6 #define CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ 6 #define CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 void TestOnUpdateStateWithFile( 220 void TestOnUpdateStateWithFile(
221 int page_id, const base::FilePath& file_path); 221 int page_id, const base::FilePath& file_path);
222 222
223 void TestOnStartDragging(const DropData& drop_data); 223 void TestOnStartDragging(const DropData& drop_data);
224 224
225 // If set, *delete_counter is incremented when this object destructs. 225 // If set, *delete_counter is incremented when this object destructs.
226 void set_delete_counter(int* delete_counter) { 226 void set_delete_counter(int* delete_counter) {
227 delete_counter_ = delete_counter; 227 delete_counter_ = delete_counter;
228 } 228 }
229 229
230 // The opener route id passed to CreateRenderView(). 230 // The opener frame route id passed to CreateRenderView().
231 int opener_route_id() const { return opener_route_id_; } 231 int opener_frame_route_id() const { return opener_frame_route_id_; }
232 232
233 // RenderWidgetHost overrides (same value, but in the Mock* type) 233 // RenderWidgetHost overrides (same value, but in the Mock* type)
234 MockRenderProcessHost* GetProcess() const override; 234 MockRenderProcessHost* GetProcess() const override;
235 235
236 bool CreateTestRenderView(const base::string16& frame_name, 236 bool CreateTestRenderView(const base::string16& frame_name,
237 int opener_route_id, 237 int opener_frame_route_id,
238 int proxy_route_id, 238 int proxy_route_id,
239 int32 max_page_id, 239 int32 max_page_id,
240 bool window_was_created_with_opener) override; 240 bool window_was_created_with_opener) override;
241 241
242 // RenderViewHost overrides -------------------------------------------------- 242 // RenderViewHost overrides --------------------------------------------------
243 243
244 bool CreateRenderView(int opener_route_id, 244 bool CreateRenderView(int opener_frame_route_id,
245 int proxy_route_id, 245 int proxy_route_id,
246 int32 max_page_id, 246 int32 max_page_id,
247 const FrameReplicationState& replicated_frame_state, 247 const FrameReplicationState& replicated_frame_state,
248 bool window_was_created_with_opener) override; 248 bool window_was_created_with_opener) override;
249 bool IsFullscreenGranted() const override; 249 bool IsFullscreenGranted() const override;
250 250
251 private: 251 private:
252 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, FilterNavigate); 252 FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, FilterNavigate);
253 253
254 void SendNavigateWithTransitionAndResponseCode(int page_id, 254 void SendNavigateWithTransitionAndResponseCode(int page_id,
255 const GURL& url, 255 const GURL& url,
256 ui::PageTransition transition, 256 ui::PageTransition transition,
257 int response_code); 257 int response_code);
258 258
259 // Calls OnNavigate on the RenderViewHost with the given information. 259 // Calls OnNavigate on the RenderViewHost with the given information.
260 // Sets the rest of the parameters in the message to the "typical" values. 260 // Sets the rest of the parameters in the message to the "typical" values.
261 // This is a helper function for simulating the most common types of loads. 261 // This is a helper function for simulating the most common types of loads.
262 void SendNavigateWithParameters( 262 void SendNavigateWithParameters(
263 int page_id, 263 int page_id,
264 const GURL& url, 264 const GURL& url,
265 ui::PageTransition transition, 265 ui::PageTransition transition,
266 const GURL& original_request_url, 266 const GURL& original_request_url,
267 int response_code, 267 int response_code,
268 const base::FilePath* file_path_for_history_item); 268 const base::FilePath* file_path_for_history_item);
269 269
270 // See set_delete_counter() above. May be NULL. 270 // See set_delete_counter() above. May be NULL.
271 int* delete_counter_; 271 int* delete_counter_;
272 272
273 // See opener_route_id() above. 273 // See opener_frame_route_id() above.
274 int opener_route_id_; 274 int opener_frame_route_id_;
275 275
276 DISALLOW_COPY_AND_ASSIGN(TestRenderViewHost); 276 DISALLOW_COPY_AND_ASSIGN(TestRenderViewHost);
277 }; 277 };
278 278
279 #if defined(COMPILER_MSVC) 279 #if defined(COMPILER_MSVC)
280 #pragma warning(pop) 280 #pragma warning(pop)
281 #endif 281 #endif
282 282
283 // Adds methods to get straight at the impl classes. 283 // Adds methods to get straight at the impl classes.
284 class RenderViewHostImplTestHarness : public RenderViewHostTestHarness { 284 class RenderViewHostImplTestHarness : public RenderViewHostTestHarness {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 private: 322 private:
323 typedef scoped_ptr<ui::test::ScopedSetSupportedScaleFactors> 323 typedef scoped_ptr<ui::test::ScopedSetSupportedScaleFactors>
324 ScopedSetSupportedScaleFactors; 324 ScopedSetSupportedScaleFactors;
325 ScopedSetSupportedScaleFactors scoped_set_supported_scale_factors_; 325 ScopedSetSupportedScaleFactors scoped_set_supported_scale_factors_;
326 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImplTestHarness); 326 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImplTestHarness);
327 }; 327 };
328 328
329 } // namespace content 329 } // namespace content
330 330
331 #endif // CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ 331 #endif // CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_
OLDNEW
« no previous file with comments | « content/test/data/post_message.html ('k') | content/test/test_render_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698