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

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

Issue 897673002: First step in enabling creating tabs without an Activity on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a-base-mounir
Patch Set: rebase Created 5 years, 10 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/shell/browser/shell_content_browser_client.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 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/shell/browser/shell_content_browser_client.h" 5 #include "content/shell/browser/shell_content_browser_client.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 const GURL& current_url, 296 const GURL& current_url,
297 const GURL& new_url) { 297 const GURL& new_url) {
298 return g_swap_processes_for_redirect; 298 return g_swap_processes_for_redirect;
299 } 299 }
300 300
301 DevToolsManagerDelegate* 301 DevToolsManagerDelegate*
302 ShellContentBrowserClient::GetDevToolsManagerDelegate() { 302 ShellContentBrowserClient::GetDevToolsManagerDelegate() {
303 return new ShellDevToolsManagerDelegate(browser_context()); 303 return new ShellDevToolsManagerDelegate(browser_context());
304 } 304 }
305 305
306 WebContents* ShellContentBrowserClient::OpenURL(BrowserContext* browser_context, 306 void ShellContentBrowserClient::OpenURL(
307 const OpenURLParams& params) { 307 BrowserContext* browser_context,
308 return Shell::CreateNewWindow(browser_context, 308 const OpenURLParams& params,
309 params.url, 309 const base::Callback<void(WebContents*)>& callback) {
310 nullptr, 310 callback.Run(Shell::CreateNewWindow(browser_context,
311 gfx::Size())->web_contents(); 311 params.url,
312 nullptr,
313 gfx::Size())->web_contents());
312 } 314 }
313 315
314 #if defined(OS_POSIX) && !defined(OS_MACOSX) 316 #if defined(OS_POSIX) && !defined(OS_MACOSX)
315 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 317 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
316 const base::CommandLine& command_line, 318 const base::CommandLine& command_line,
317 int child_process_id, 319 int child_process_id,
318 FileDescriptorInfo* mappings) { 320 FileDescriptorInfo* mappings) {
319 #if defined(OS_ANDROID) 321 #if defined(OS_ANDROID)
320 int flags = base::File::FLAG_OPEN | base::File::FLAG_READ; 322 int flags = base::File::FLAG_OPEN | base::File::FLAG_READ;
321 base::FilePath pak_file; 323 base::FilePath pak_file;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 ShellBrowserContext* 386 ShellBrowserContext*
385 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( 387 ShellContentBrowserClient::ShellBrowserContextForBrowserContext(
386 BrowserContext* content_browser_context) { 388 BrowserContext* content_browser_context) {
387 if (content_browser_context == browser_context()) 389 if (content_browser_context == browser_context())
388 return browser_context(); 390 return browser_context();
389 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); 391 DCHECK_EQ(content_browser_context, off_the_record_browser_context());
390 return off_the_record_browser_context(); 392 return off_the_record_browser_context();
391 } 393 }
392 394
393 } // namespace content 395 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell_content_browser_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698