OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/webui/test_chrome_web_ui_factory.h" | 5 #include "chrome/browser/ui/webui/test_chrome_web_ui_factory.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "content/public/browser/web_contents.h" | 8 #include "content/public/browser/web_contents.h" |
9 | 9 |
10 using content::WebContents; | 10 using content::WebContents; |
| 11 using content::WebUI; |
11 using content::WebUIController; | 12 using content::WebUIController; |
12 | 13 |
13 TestChromeWebUIFactory::WebUIProvider::~WebUIProvider() { | 14 TestChromeWebUIFactory::WebUIProvider::~WebUIProvider() { |
14 } | 15 } |
15 | 16 |
16 TestChromeWebUIFactory::TestChromeWebUIFactory() { | 17 TestChromeWebUIFactory::TestChromeWebUIFactory() { |
17 } | 18 } |
18 | 19 |
19 TestChromeWebUIFactory::~TestChromeWebUIFactory() { | 20 TestChromeWebUIFactory::~TestChromeWebUIFactory() { |
20 } | 21 } |
(...skipping 29 matching lines...) Expand all Loading... |
50 return static_cast<TestChromeWebUIFactory*>( | 51 return static_cast<TestChromeWebUIFactory*>( |
51 ChromeWebUIFactory::GetInstance()); | 52 ChromeWebUIFactory::GetInstance()); |
52 } | 53 } |
53 | 54 |
54 TestChromeWebUIFactory::WebUIProvider* TestChromeWebUIFactory::GetWebUIProvider( | 55 TestChromeWebUIFactory::WebUIProvider* TestChromeWebUIFactory::GetWebUIProvider( |
55 Profile* profile, const GURL& url) const { | 56 Profile* profile, const GURL& url) const { |
56 FactoryOverridesMap::const_iterator found = | 57 FactoryOverridesMap::const_iterator found = |
57 factory_overrides_.find(url.host()); | 58 factory_overrides_.find(url.host()); |
58 return (found == factory_overrides_.end()) ? NULL : found->second; | 59 return (found == factory_overrides_.end()) ? NULL : found->second; |
59 } | 60 } |
OLD | NEW |