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

Side by Side Diff: content/test/test_render_frame_host.cc

Issue 1544273002: Switch to standard integer types in content/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/test_render_frame_host.h ('k') | content/test/test_render_frame_host_factory.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test/test_render_frame_host.h" 5 #include "content/test/test_render_frame_host.h"
6 6
7 #include "content/browser/frame_host/frame_tree.h" 7 #include "content/browser/frame_host/frame_tree.h"
8 #include "content/browser/frame_host/navigation_handle_impl.h" 8 #include "content/browser/frame_host/navigation_handle_impl.h"
9 #include "content/browser/frame_host/navigation_request.h" 9 #include "content/browser/frame_host/navigation_request.h"
10 #include "content/browser/frame_host/navigator.h" 10 #include "content/browser/frame_host/navigator.h"
(...skipping 27 matching lines...) Expand all
38 RenderFrameHost* render_frame_host) { 38 RenderFrameHost* render_frame_host) {
39 last_created_frame_ = render_frame_host; 39 last_created_frame_ = render_frame_host;
40 } 40 }
41 41
42 TestRenderFrameHost::TestRenderFrameHost(SiteInstance* site_instance, 42 TestRenderFrameHost::TestRenderFrameHost(SiteInstance* site_instance,
43 RenderViewHostImpl* render_view_host, 43 RenderViewHostImpl* render_view_host,
44 RenderFrameHostDelegate* delegate, 44 RenderFrameHostDelegate* delegate,
45 RenderWidgetHostDelegate* rwh_delegate, 45 RenderWidgetHostDelegate* rwh_delegate,
46 FrameTree* frame_tree, 46 FrameTree* frame_tree,
47 FrameTreeNode* frame_tree_node, 47 FrameTreeNode* frame_tree_node,
48 int32 routing_id, 48 int32_t routing_id,
49 int32 widget_routing_id, 49 int32_t widget_routing_id,
50 int flags) 50 int flags)
51 : RenderFrameHostImpl(site_instance, 51 : RenderFrameHostImpl(site_instance,
52 render_view_host, 52 render_view_host,
53 delegate, 53 delegate,
54 rwh_delegate, 54 rwh_delegate,
55 frame_tree, 55 frame_tree,
56 frame_tree_node, 56 frame_tree_node,
57 routing_id, 57 routing_id,
58 widget_routing_id, 58 widget_routing_id,
59 flags), 59 flags),
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 if (!redirect_url.is_empty()) 388 if (!redirect_url.is_empty())
389 url_loader->SimulateServerRedirect(redirect_url); 389 url_loader->SimulateServerRedirect(redirect_url);
390 390
391 // Simulate the network stack commit. 391 // Simulate the network stack commit.
392 scoped_refptr<ResourceResponse> response(new ResourceResponse); 392 scoped_refptr<ResourceResponse> response(new ResourceResponse);
393 // TODO(carlosk): ideally with PlzNavigate it should be possible someday to 393 // TODO(carlosk): ideally with PlzNavigate it should be possible someday to
394 // fully commit the navigation at this call to CallOnResponseStarted. 394 // fully commit the navigation at this call to CallOnResponseStarted.
395 url_loader->CallOnResponseStarted(response, MakeEmptyStream()); 395 url_loader->CallOnResponseStarted(response, MakeEmptyStream());
396 } 396 }
397 397
398 int32 TestRenderFrameHost::ComputeNextPageID() { 398 int32_t TestRenderFrameHost::ComputeNextPageID() {
399 const NavigationEntryImpl* entry = static_cast<NavigationEntryImpl*>( 399 const NavigationEntryImpl* entry = static_cast<NavigationEntryImpl*>(
400 frame_tree_node()->navigator()->GetController()->GetPendingEntry()); 400 frame_tree_node()->navigator()->GetController()->GetPendingEntry());
401 DCHECK(!(entry && entry->site_instance()) || 401 DCHECK(!(entry && entry->site_instance()) ||
402 entry->site_instance() == GetSiteInstance()); 402 entry->site_instance() == GetSiteInstance());
403 // Entry can be null when committing an error page (the pending entry was 403 // Entry can be null when committing an error page (the pending entry was
404 // cleared during DidFailProvisionalLoad). 404 // cleared during DidFailProvisionalLoad).
405 int page_id = entry ? entry->GetPageID() : -1; 405 int page_id = entry ? entry->GetPageID() : -1;
406 if (page_id == -1) { 406 if (page_id == -1) {
407 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); 407 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate());
408 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; 408 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1;
409 } 409 }
410 return page_id; 410 return page_id;
411 } 411 }
412 412
413 } // namespace content 413 } // namespace content
OLDNEW
« no previous file with comments | « content/test/test_render_frame_host.h ('k') | content/test/test_render_frame_host_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698