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 "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 : wrapper_(wrapper), | 109 : wrapper_(wrapper), |
110 picker_factory_(factory), | 110 picker_factory_(factory), |
111 web_intent_data_fetcher_( | 111 web_intent_data_fetcher_( |
112 new WebIntentDataFetcher(this, | 112 new WebIntentDataFetcher(this, |
113 GetWebIntentsRegistry(wrapper))), | 113 GetWebIntentsRegistry(wrapper))), |
114 favicon_fetcher_( | 114 favicon_fetcher_( |
115 new FaviconFetcher(this, GetFaviconService(wrapper))), | 115 new FaviconFetcher(this, GetFaviconService(wrapper))), |
116 picker_(NULL), | 116 picker_(NULL), |
117 pending_async_count_(0), | 117 pending_async_count_(0), |
118 service_tab_(NULL) { | 118 service_tab_(NULL) { |
119 NavigationController* controller = &wrapper->controller(); | 119 NavigationController* controller = &wrapper->tab_contents()->controller(); |
120 registrar_.Add(this, content::NOTIFICATION_LOAD_START, | 120 registrar_.Add(this, content::NOTIFICATION_LOAD_START, |
121 content::Source<NavigationController>(controller)); | 121 content::Source<NavigationController>(controller)); |
122 registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING, | 122 registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING, |
123 content::Source<NavigationController>(controller)); | 123 content::Source<NavigationController>(controller)); |
124 } | 124 } |
125 | 125 |
126 WebIntentPickerController::~WebIntentPickerController() { | 126 WebIntentPickerController::~WebIntentPickerController() { |
127 } | 127 } |
128 | 128 |
129 void WebIntentPickerController::SetIntentsHost( | 129 void WebIntentPickerController::SetIntentsHost( |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 if (gfx::PNGCodec::Decode(favicon_data.image_data->front(), | 323 if (gfx::PNGCodec::Decode(favicon_data.image_data->front(), |
324 favicon_data.image_data->size(), | 324 favicon_data.image_data->size(), |
325 &icon_bitmap)) { | 325 &icon_bitmap)) { |
326 controller_->OnFaviconDataAvailable(index, icon_bitmap); | 326 controller_->OnFaviconDataAvailable(index, icon_bitmap); |
327 return; | 327 return; |
328 } | 328 } |
329 } | 329 } |
330 | 330 |
331 controller_->OnFaviconDataUnavailable(index); | 331 controller_->OnFaviconDataUnavailable(index); |
332 } | 332 } |
OLD | NEW |