Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: chrome/browser/ui/intents/web_intent_picker_controller.cc

Issue 8983010: Convert WebContents to return a content::NavigationController instead of the implementation. Upda... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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->tab_contents()->GetController(); 119 content::NavigationController* controller =
120 &wrapper->tab_contents()->GetController();
120 registrar_.Add(this, content::NOTIFICATION_LOAD_START, 121 registrar_.Add(this, content::NOTIFICATION_LOAD_START,
121 content::Source<content::NavigationController>(controller)); 122 content::Source<content::NavigationController>(controller));
122 registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING, 123 registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING,
123 content::Source<content::NavigationController>(controller)); 124 content::Source<content::NavigationController>(controller));
124 } 125 }
125 126
126 WebIntentPickerController::~WebIntentPickerController() { 127 WebIntentPickerController::~WebIntentPickerController() {
127 } 128 }
128 129
129 void WebIntentPickerController::SetIntentsDispatcher( 130 void WebIntentPickerController::SetIntentsDispatcher(
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 if (gfx::PNGCodec::Decode(favicon_data.image_data->front(), 324 if (gfx::PNGCodec::Decode(favicon_data.image_data->front(),
324 favicon_data.image_data->size(), 325 favicon_data.image_data->size(),
325 &icon_bitmap)) { 326 &icon_bitmap)) {
326 controller_->OnFaviconDataAvailable(index, icon_bitmap); 327 controller_->OnFaviconDataAvailable(index, icon_bitmap);
327 return; 328 return;
328 } 329 }
329 } 330 }
330 331
331 controller_->OnFaviconDataUnavailable(index); 332 controller_->OnFaviconDataUnavailable(index);
332 } 333 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698