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/intents/web_intent_picker_controller.h" | 5 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "chrome/browser/favicon/favicon_service.h" | 9 #include "chrome/browser/favicon/favicon_service.h" |
10 #include "chrome/browser/intents/web_intent_service_data.h" | |
11 #include "chrome/browser/intents/web_intents_registry.h" | 10 #include "chrome/browser/intents/web_intents_registry.h" |
12 #include "chrome/browser/intents/web_intents_registry_factory.h" | 11 #include "chrome/browser/intents/web_intents_registry_factory.h" |
13 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/ui/intents/web_intent_picker.h" | 13 #include "chrome/browser/ui/intents/web_intent_picker.h" |
15 #include "chrome/browser/ui/intents/web_intent_picker_factory.h" | 14 #include "chrome/browser/ui/intents/web_intent_picker_factory.h" |
16 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 15 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
17 #include "chrome/browser/webdata/web_data_service.h" | 16 #include "chrome/browser/webdata/web_data_service.h" |
18 #include "content/browser/tab_contents/tab_contents.h" | 17 #include "content/browser/tab_contents/tab_contents.h" |
19 #include "content/common/notification_source.h" | 18 #include "content/common/notification_source.h" |
20 #include "ui/gfx/codec/png_codec.h" | 19 #include "ui/gfx/codec/png_codec.h" |
| 20 #include "webkit/glue/web_intent_service_data.h" |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 // Gets the favicon service for the profile in |tab_contents|. | 24 // Gets the favicon service for the profile in |tab_contents|. |
25 FaviconService* GetFaviconService(TabContentsWrapper* wrapper) { | 25 FaviconService* GetFaviconService(TabContentsWrapper* wrapper) { |
26 return wrapper->profile()->GetFaviconService(Profile::EXPLICIT_ACCESS); | 26 return wrapper->profile()->GetFaviconService(Profile::EXPLICIT_ACCESS); |
27 } | 27 } |
28 | 28 |
29 // Gets the web intents registry for the profile in |tab_contents|. | 29 // Gets the web intents registry for the profile in |tab_contents|. |
30 WebIntentsRegistry* GetWebIntentsRegistry(TabContentsWrapper* wrapper) { | 30 WebIntentsRegistry* GetWebIntentsRegistry(TabContentsWrapper* wrapper) { |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 if (gfx::PNGCodec::Decode(favicon_data.image_data->front(), | 254 if (gfx::PNGCodec::Decode(favicon_data.image_data->front(), |
255 favicon_data.image_data->size(), | 255 favicon_data.image_data->size(), |
256 &icon_bitmap)) { | 256 &icon_bitmap)) { |
257 controller_->OnFaviconDataAvailable(index, icon_bitmap); | 257 controller_->OnFaviconDataAvailable(index, icon_bitmap); |
258 return; | 258 return; |
259 } | 259 } |
260 } | 260 } |
261 | 261 |
262 controller_->OnFaviconDataUnavailable(index); | 262 controller_->OnFaviconDataUnavailable(index); |
263 } | 263 } |
OLD | NEW |