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/extensions/api/management/management_api.h" | 5 #include "chrome/browser/extensions/api/management/management_api.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 } | 919 } |
920 | 920 |
921 FaviconService* favicon_service = | 921 FaviconService* favicon_service = |
922 FaviconServiceFactory::GetForProfile(GetProfile(), | 922 FaviconServiceFactory::GetForProfile(GetProfile(), |
923 Profile::EXPLICIT_ACCESS); | 923 Profile::EXPLICIT_ACCESS); |
924 DCHECK(favicon_service); | 924 DCHECK(favicon_service); |
925 | 925 |
926 title_ = params->title; | 926 title_ = params->title; |
927 launch_url_ = launch_url; | 927 launch_url_ = launch_url; |
928 | 928 |
929 favicon_service->GetFaviconImageForURL( | 929 favicon_service->GetFaviconImageForPageURL( |
930 FaviconService::FaviconForURLParams( | 930 FaviconService::FaviconForPageURLParams( |
931 launch_url, favicon_base::FAVICON, gfx::kFaviconSize), | 931 launch_url, favicon_base::FAVICON, gfx::kFaviconSize), |
932 base::Bind(&ManagementGenerateAppForLinkFunction::OnFaviconForApp, this), | 932 base::Bind(&ManagementGenerateAppForLinkFunction::OnFaviconForApp, this), |
933 &cancelable_task_tracker_); | 933 &cancelable_task_tracker_); |
934 | 934 |
935 // Matched with a Release() in OnExtensionLoaded(). | 935 // Matched with a Release() in OnExtensionLoaded(). |
936 AddRef(); | 936 AddRef(); |
937 | 937 |
938 // Response is sent async in OnExtensionLoaded(). | 938 // Response is sent async in OnExtensionLoaded(). |
939 return true; | 939 return true; |
940 } | 940 } |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 return g_factory.Pointer(); | 1033 return g_factory.Pointer(); |
1034 } | 1034 } |
1035 | 1035 |
1036 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { | 1036 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { |
1037 management_event_router_.reset( | 1037 management_event_router_.reset( |
1038 new ManagementEventRouter(Profile::FromBrowserContext(browser_context_))); | 1038 new ManagementEventRouter(Profile::FromBrowserContext(browser_context_))); |
1039 EventRouter::Get(browser_context_)->UnregisterObserver(this); | 1039 EventRouter::Get(browser_context_)->UnregisterObserver(this); |
1040 } | 1040 } |
1041 | 1041 |
1042 } // namespace extensions | 1042 } // namespace extensions |
OLD | NEW |