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

Side by Side Diff: content/public/test/web_contents_tester.cc

Issue 10836164: Change policy to not trigger dangerous download UI for web intents dispatched files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move to WebContentsTester Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « content/public/test/web_contents_tester.h ('k') | no next file » | 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 #include "content/public/test/web_contents_tester.h" 5 #include "content/public/test/web_contents_tester.h"
6 6
7 #include "content/browser/web_contents/test_web_contents.h" 7 #include "content/browser/web_contents/test_web_contents.h"
8 #include "content/browser/web_contents/render_view_host_manager.h"
8 9
9 namespace content { 10 namespace content {
10 11
11 namespace { 12 namespace {
12 13
13 // The two subclasses here are instantiated via the deprecated 14 // The two subclasses here are instantiated via the deprecated
14 // CreateWebContentsFor... factories below. 15 // CreateWebContentsFor... factories below.
15 16
16 class TestWebContentsCountFocus : public TestWebContents { 17 class TestWebContentsCountFocus : public TestWebContents {
17 public: 18 public:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 56 }
56 57
57 // static 58 // static
58 WebContents* WebContentsTester::CreateTestWebContents( 59 WebContents* WebContentsTester::CreateTestWebContents(
59 BrowserContext* browser_context, 60 BrowserContext* browser_context,
60 SiteInstance* instance) { 61 SiteInstance* instance) {
61 return TestWebContents::Create(browser_context, instance); 62 return TestWebContents::Create(browser_context, instance);
62 } 63 }
63 64
64 // static 65 // static
66 WebContents* WebContentsTester::CreateTestWebContentsNoInit(
67 BrowserContext* browser_context) {
68 TestWebContents* contents = TestWebContents::CreateWithoutInit(browser_context );
jam 2012/08/28 21:50:19 nit: 80 chars...
Greg Billock 2012/08/29 00:55:31 (was reverted in this change)
69 contents->GetRenderManagerForTesting()->Init(
70 browser_context, NULL, MSG_ROUTING_NONE);
71 return contents;
72 }
73
74 // static
65 WebContents* WebContentsTester::CreateTestWebContentsCountSetFocusToLocationBar( 75 WebContents* WebContentsTester::CreateTestWebContentsCountSetFocusToLocationBar(
66 BrowserContext* browser_context, 76 BrowserContext* browser_context,
67 SiteInstance* instance) { 77 SiteInstance* instance) {
68 TestWebContentsCountSetFocusToLocationBar* web_contents = 78 TestWebContentsCountSetFocusToLocationBar* web_contents =
69 new TestWebContentsCountSetFocusToLocationBar(browser_context); 79 new TestWebContentsCountSetFocusToLocationBar(browser_context);
70 web_contents->Init(browser_context, instance, MSG_ROUTING_NONE, NULL); 80 web_contents->Init(browser_context, instance, MSG_ROUTING_NONE, NULL);
71 return web_contents; 81 return web_contents;
72 } 82 }
73 83
74 // static 84 // static
75 WebContents* WebContentsTester::CreateTestWebContentsCountFocus( 85 WebContents* WebContentsTester::CreateTestWebContentsCountFocus(
76 BrowserContext* browser_context, 86 BrowserContext* browser_context,
77 SiteInstance* instance) { 87 SiteInstance* instance) {
78 TestWebContentsCountFocus* web_contents = 88 TestWebContentsCountFocus* web_contents =
79 new TestWebContentsCountFocus(browser_context); 89 new TestWebContentsCountFocus(browser_context);
80 web_contents->Init(browser_context, instance, MSG_ROUTING_NONE, NULL); 90 web_contents->Init(browser_context, instance, MSG_ROUTING_NONE, NULL);
81 return web_contents; 91 return web_contents;
82 } 92 }
83 93
84 } // namespace content 94 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/web_contents_tester.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698