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

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

Issue 2946113002: Use FrameIsAd to decide whether to isolate a frame in TopDocumentIsolation mode. (Closed)
Patch Set: Rebasing... Created 3 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
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 <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 #include <vector>
9 10
10 #include "base/base_switches.h" 11 #include "base/base_switches.h"
11 #include "base/command_line.h" 12 #include "base/command_line.h"
12 #include "base/files/file.h" 13 #include "base/files/file.h"
13 #include "base/files/file_util.h" 14 #include "base/files/file_util.h"
14 #include "base/json/json_reader.h" 15 #include "base/json/json_reader.h"
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/memory/ptr_util.h" 17 #include "base/memory/ptr_util.h"
17 #include "base/path_service.h" 18 #include "base/path_service.h"
18 #include "base/strings/pattern.h" 19 #include "base/strings/pattern.h"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 341
341 SpeechRecognitionManagerDelegate* 342 SpeechRecognitionManagerDelegate*
342 ShellContentBrowserClient::CreateSpeechRecognitionManagerDelegate() { 343 ShellContentBrowserClient::CreateSpeechRecognitionManagerDelegate() {
343 return new ShellSpeechRecognitionManagerDelegate(); 344 return new ShellSpeechRecognitionManagerDelegate();
344 } 345 }
345 346
346 net::NetLog* ShellContentBrowserClient::GetNetLog() { 347 net::NetLog* ShellContentBrowserClient::GetNetLog() {
347 return shell_browser_main_parts_->net_log(); 348 return shell_browser_main_parts_->net_log();
348 } 349 }
349 350
351 bool ShellContentBrowserClient::ShouldIsolateFrameFromMainContent(
352 content::RenderFrameHost* frame,
353 const GURL& dest_url,
354 content::SiteInstance* main_frame_site_instance) {
355 // To make it easier to test TopDocumentIsolation in content_browsertests,
356 // put *all* cross-site subframes into the TDI process (when TDI mode is
357 // enabled).
358 return true;
359 }
360
350 bool ShellContentBrowserClient::ShouldSwapProcessesForRedirect( 361 bool ShellContentBrowserClient::ShouldSwapProcessesForRedirect(
351 BrowserContext* browser_context, 362 BrowserContext* browser_context,
352 const GURL& current_url, 363 const GURL& current_url,
353 const GURL& new_url) { 364 const GURL& new_url) {
354 return g_swap_processes_for_redirect; 365 return g_swap_processes_for_redirect;
355 } 366 }
356 367
357 DevToolsManagerDelegate* 368 DevToolsManagerDelegate*
358 ShellContentBrowserClient::GetDevToolsManagerDelegate() { 369 ShellContentBrowserClient::GetDevToolsManagerDelegate() {
359 return new ShellDevToolsManagerDelegate(browser_context()); 370 return new ShellDevToolsManagerDelegate(browser_context());
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 ShellBrowserContext* ShellContentBrowserClient::browser_context() { 422 ShellBrowserContext* ShellContentBrowserClient::browser_context() {
412 return shell_browser_main_parts_->browser_context(); 423 return shell_browser_main_parts_->browser_context();
413 } 424 }
414 425
415 ShellBrowserContext* 426 ShellBrowserContext*
416 ShellContentBrowserClient::off_the_record_browser_context() { 427 ShellContentBrowserClient::off_the_record_browser_context() {
417 return shell_browser_main_parts_->off_the_record_browser_context(); 428 return shell_browser_main_parts_->off_the_record_browser_context();
418 } 429 }
419 430
420 } // namespace content 431 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698