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 "ash/shell/content/client/shell_content_browser_client.h" | 5 #include "ash/shell/content/client/shell_content_browser_client.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/shell/content/client/shell_browser_main_parts.h" | 9 #include "ash/shell/content/client/shell_browser_main_parts.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "content/public/browser/browser_context.h" | |
12 #include "content/public/browser/browser_thread.h" | |
13 #include "content/public/browser/storage_partition.h" | |
14 #include "storage/browser/quota/quota_settings.h" | |
15 #include "third_party/skia/include/core/SkBitmap.h" | 11 #include "third_party/skia/include/core/SkBitmap.h" |
16 | 12 |
17 namespace ash { | 13 namespace ash { |
18 namespace shell { | 14 namespace shell { |
19 | 15 |
20 ShellContentBrowserClient::ShellContentBrowserClient() | 16 ShellContentBrowserClient::ShellContentBrowserClient() |
21 : shell_browser_main_parts_(nullptr) {} | 17 : shell_browser_main_parts_(nullptr) {} |
22 | 18 |
23 ShellContentBrowserClient::~ShellContentBrowserClient() {} | 19 ShellContentBrowserClient::~ShellContentBrowserClient() {} |
24 | 20 |
25 content::BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( | 21 content::BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( |
26 const content::MainFunctionParams& parameters) { | 22 const content::MainFunctionParams& parameters) { |
27 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters); | 23 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters); |
28 return shell_browser_main_parts_; | 24 return shell_browser_main_parts_; |
29 } | 25 } |
30 | 26 |
31 void ShellContentBrowserClient::GetQuotaSettings( | |
32 content::BrowserContext* context, | |
33 content::StoragePartition* partition, | |
34 const storage::OptionalQuotaSettingsCallback& callback) { | |
35 content::BrowserThread::PostTaskAndReplyWithResult( | |
36 content::BrowserThread::FILE, FROM_HERE, | |
37 base::Bind(&storage::CalculateNominalDynamicSettings, | |
38 partition->GetPath(), context->IsOffTheRecord()), | |
39 callback); | |
40 } | |
41 | |
42 } // namespace examples | 27 } // namespace examples |
43 } // namespace views | 28 } // namespace views |
OLD | NEW |