OLD | NEW |
---|---|
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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
397 return main_parts; | 397 return main_parts; |
398 } | 398 } |
399 | 399 |
400 content::WebContentsView* | 400 content::WebContentsView* |
401 ChromeContentBrowserClient::OverrideCreateWebContentsView( | 401 ChromeContentBrowserClient::OverrideCreateWebContentsView( |
402 WebContents* web_contents, | 402 WebContents* web_contents, |
403 content::RenderViewHostDelegateView** render_view_host_delegate_view) { | 403 content::RenderViewHostDelegateView** render_view_host_delegate_view) { |
404 return NULL; | 404 return NULL; |
405 } | 405 } |
406 | 406 |
407 std::string ChromeContentBrowserClient::GetStoragePartitionForChildProcess( | |
408 content::BrowserContext* browser_context, | |
409 int child_process_id) { | |
Charlie Reis
2012/07/02 23:21:23
Let's add a comment explaining that Chrome uses th
awong
2012/07/09 20:37:43
Added...do we need to do any sort of prefixing? l
Charlie Reis
2012/07/10 21:37:48
I don't think prefixing is needed.
| |
410 Profile* profile = Profile::FromBrowserContext(browser_context); | |
411 ExtensionService* extension_service = | |
412 ExtensionSystem::Get(profile)->extension_service(); | |
413 if (extension_service) { | |
414 const extensions::Extension* installed_app = extension_service-> | |
415 GetInstalledAppForRenderer(child_process_id); | |
416 if (installed_app != NULL && installed_app->is_storage_isolated()) { | |
Charlie Reis
2012/07/02 23:21:23
Is this going to work with browser tags and other
awong
2012/07/09 20:37:43
Cookies and cache should be migrated into the stor
Charlie Reis
2012/07/10 21:37:48
No, Nasko's CL hasn't landed yet. We can unify al
| |
417 return installed_app->id(); | |
418 } | |
419 } | |
420 return std::string(); | |
421 } | |
422 | |
407 content::WebContentsViewDelegate* | 423 content::WebContentsViewDelegate* |
408 ChromeContentBrowserClient::GetWebContentsViewDelegate( | 424 ChromeContentBrowserClient::GetWebContentsViewDelegate( |
409 content::WebContents* web_contents) { | 425 content::WebContents* web_contents) { |
410 return browser::CreateWebContentsViewDelegate(web_contents); | 426 return browser::CreateWebContentsViewDelegate(web_contents); |
411 } | 427 } |
412 | 428 |
413 void ChromeContentBrowserClient::RenderViewHostCreated( | 429 void ChromeContentBrowserClient::RenderViewHostCreated( |
414 RenderViewHost* render_view_host) { | 430 RenderViewHost* render_view_host) { |
415 | 431 |
416 SiteInstance* site_instance = render_view_host->GetSiteInstance(); | 432 SiteInstance* site_instance = render_view_host->GetSiteInstance(); |
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1647 io_thread_application_locale_ = locale; | 1663 io_thread_application_locale_ = locale; |
1648 } | 1664 } |
1649 | 1665 |
1650 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 1666 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
1651 const std::string& locale) { | 1667 const std::string& locale) { |
1652 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 1668 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
1653 io_thread_application_locale_ = locale; | 1669 io_thread_application_locale_ = locale; |
1654 } | 1670 } |
1655 | 1671 |
1656 } // namespace chrome | 1672 } // namespace chrome |
OLD | NEW |