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