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
3 // found in the LICENSE file.
5 #include "apps/shell/app_shell_content_browser_client.h"
7 #include "apps/shell/app_shell_browser_main_parts.h"
8 #include "content/shell/browser/shell_browser_context.h"
12 AppShellContentBrowserClient::AppShellContentBrowserClient()
13 : browser_main_parts_(NULL) {
16 AppShellContentBrowserClient::~AppShellContentBrowserClient() {
19 content::BrowserMainParts* AppShellContentBrowserClient::CreateBrowserMainParts(
20 const content::MainFunctionParams& parameters) {
21 browser_main_parts_ = new AppShellBrowserMainParts(parameters);
22 return browser_main_parts_;
25 net::URLRequestContextGetter*
26 AppShellContentBrowserClient::CreateRequestContext(
27 content::BrowserContext* content_browser_context,
28 content::ProtocolHandlerMap* protocol_handlers) {
29 // TODO(jamescook): Should this be an off-the-record context?
30 content::ShellBrowserContext* shell_browser_context =
31 browser_main_parts_->browser_context();
32 return shell_browser_context->CreateRequestContext(protocol_handlers);