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

Side by Side Diff: content/shell/shell_content_browser_client.cc

Issue 11414260: Revert 170451 - [content shell] add support for testRunner.canOpenWindows and disallow opening wind… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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/shell/shell_content_browser_client.h ('k') | content/shell/shell_messages.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 (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/shell/shell_content_browser_client.h" 5 #include "content/shell/shell_content_browser_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "content/public/browser/render_process_host.h" 10 #include "content/public/browser/render_process_host.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 WebContentsViewDelegate* ShellContentBrowserClient::GetWebContentsViewDelegate( 115 WebContentsViewDelegate* ShellContentBrowserClient::GetWebContentsViewDelegate(
116 WebContents* web_contents) { 116 WebContents* web_contents) {
117 #if defined(TOOLKIT_GTK) || defined(OS_WIN) || defined(OS_MACOSX) 117 #if defined(TOOLKIT_GTK) || defined(OS_WIN) || defined(OS_MACOSX)
118 return CreateShellWebContentsViewDelegate(web_contents); 118 return CreateShellWebContentsViewDelegate(web_contents);
119 #endif 119 #endif
120 NOTIMPLEMENTED(); 120 NOTIMPLEMENTED();
121 return NULL; 121 return NULL;
122 } 122 }
123 123
124 bool ShellContentBrowserClient::CanCreateWindow(
125 const GURL& opener_url,
126 const GURL& origin,
127 WindowContainerType container_type,
128 ResourceContext* context,
129 int render_process_id,
130 bool* no_javascript_access) {
131 *no_javascript_access = false;
132 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
133 return true;
134 return WebKitTestController::Get()->can_open_windows();
135 }
136
137 #if defined(OS_ANDROID) 124 #if defined(OS_ANDROID)
138 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 125 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
139 const CommandLine& command_line, 126 const CommandLine& command_line,
140 int child_process_id, 127 int child_process_id,
141 std::vector<content::FileDescriptorInfo>* mappings) { 128 std::vector<content::FileDescriptorInfo>* mappings) {
142 int flags = base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ; 129 int flags = base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ;
143 FilePath pak_file; 130 FilePath pak_file;
144 bool r = PathService::Get(base::DIR_ANDROID_APP_DATA, &pak_file); 131 bool r = PathService::Get(base::DIR_ANDROID_APP_DATA, &pak_file);
145 CHECK(r); 132 CHECK(r);
146 pak_file = pak_file.Append(FILE_PATH_LITERAL("paks")); 133 pak_file = pak_file.Append(FILE_PATH_LITERAL("paks"));
(...skipping 18 matching lines...) Expand all
165 ShellBrowserContext* 152 ShellBrowserContext*
166 ShellContentBrowserClient::off_the_record_browser_context() { 153 ShellContentBrowserClient::off_the_record_browser_context() {
167 return shell_browser_main_parts_->off_the_record_browser_context(); 154 return shell_browser_main_parts_->off_the_record_browser_context();
168 } 155 }
169 156
170 AccessTokenStore* ShellContentBrowserClient::CreateAccessTokenStore() { 157 AccessTokenStore* ShellContentBrowserClient::CreateAccessTokenStore() {
171 return new ShellAccessTokenStore(browser_context()->GetRequestContext()); 158 return new ShellAccessTokenStore(browser_context()->GetRequestContext());
172 } 159 }
173 160
174 } // namespace content 161 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_content_browser_client.h ('k') | content/shell/shell_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698