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/ui/webui/chrome_web_ui_controller_factory.h" | 5 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/message_loop/message_loop_proxy.h" | |
13 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
| 13 #include "base/thread_task_runner_handle.h" |
14 #include "chrome/browser/about_flags.h" | 14 #include "chrome/browser/about_flags.h" |
15 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" | 15 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" |
16 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" | 16 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" |
17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/profiles/profile_manager.h" | 18 #include "chrome/browser/profiles/profile_manager.h" |
19 #include "chrome/browser/ui/webui/about_ui.h" | 19 #include "chrome/browser/ui/webui/about_ui.h" |
20 #include "chrome/browser/ui/webui/app_launcher_page_ui.h" | 20 #include "chrome/browser/ui/webui/app_launcher_page_ui.h" |
21 #include "chrome/browser/ui/webui/bookmarks_ui.h" | 21 #include "chrome/browser/ui/webui/bookmarks_ui.h" |
22 #include "chrome/browser/ui/webui/components_ui.h" | 22 #include "chrome/browser/ui/webui/components_ui.h" |
23 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h" | 23 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h" |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 url.host() == dom_distiller::kChromeUIDomDistillerHost) { | 554 url.host() == dom_distiller::kChromeUIDomDistillerHost) { |
555 return &NewWebUI<dom_distiller::DomDistillerUi>; | 555 return &NewWebUI<dom_distiller::DomDistillerUi>; |
556 } | 556 } |
557 | 557 |
558 return NULL; | 558 return NULL; |
559 } | 559 } |
560 | 560 |
561 void RunFaviconCallbackAsync( | 561 void RunFaviconCallbackAsync( |
562 const favicon_base::FaviconResultsCallback& callback, | 562 const favicon_base::FaviconResultsCallback& callback, |
563 const std::vector<favicon_base::FaviconRawBitmapResult>* results) { | 563 const std::vector<favicon_base::FaviconRawBitmapResult>* results) { |
564 base::MessageLoopProxy::current()->PostTask( | 564 base::ThreadTaskRunnerHandle::Get()->PostTask( |
565 FROM_HERE, | 565 FROM_HERE, |
566 base::Bind(&favicon::FaviconService::FaviconResultsCallbackRunner, | 566 base::Bind(&favicon::FaviconService::FaviconResultsCallbackRunner, |
567 callback, base::Owned(results))); | 567 callback, base::Owned(results))); |
568 } | 568 } |
569 | 569 |
570 } // namespace | 570 } // namespace |
571 | 571 |
572 WebUI::TypeID ChromeWebUIControllerFactory::GetWebUIType( | 572 WebUI::TypeID ChromeWebUIControllerFactory::GetWebUIType( |
573 content::BrowserContext* browser_context, const GURL& url) const { | 573 content::BrowserContext* browser_context, const GURL& url) const { |
574 Profile* profile = Profile::FromBrowserContext(browser_context); | 574 Profile* profile = Profile::FromBrowserContext(browser_context); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 #endif | 739 #endif |
740 | 740 |
741 // Android doesn't use the plugins pages. | 741 // Android doesn't use the plugins pages. |
742 if (page_url.host() == chrome::kChromeUIPluginsHost) | 742 if (page_url.host() == chrome::kChromeUIPluginsHost) |
743 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 743 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
744 | 744 |
745 #endif | 745 #endif |
746 | 746 |
747 return NULL; | 747 return NULL; |
748 } | 748 } |
OLD | NEW |