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

Side by Side Diff: chrome/browser/task_manager/tab_contents_resource_provider.cc

Issue 23576007: FindBrowserWithWebContents now recognises DevTool's embedded WebContent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Browser test added Created 7 years, 3 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/task_manager/tab_contents_resource_provider.h" 5 #include "chrome/browser/task_manager/tab_contents_resource_provider.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/favicon/favicon_tab_helper.h" 10 #include "chrome/browser/favicon/favicon_tab_helper.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 return l10n_util::GetStringFUTF16(message_id, tab_title); 141 return l10n_util::GetStringFUTF16(message_id, tab_title);
142 } 142 }
143 143
144 string16 TabContentsResource::GetProfileName() const { 144 string16 TabContentsResource::GetProfileName() const {
145 return util::GetProfileNameFromInfoCache(profile_); 145 return util::GetProfileNameFromInfoCache(profile_);
146 } 146 }
147 147
148 gfx::ImageSkia TabContentsResource::GetIcon() const { 148 gfx::ImageSkia TabContentsResource::GetIcon() const {
149 if (IsContentsPrerendering(web_contents_)) 149 if (IsContentsPrerendering(web_contents_))
150 return *prerender_icon_; 150 return *prerender_icon_;
151 FaviconTabHelper::CreateForWebContents(web_contents_);
151 return FaviconTabHelper::FromWebContents(web_contents_)-> 152 return FaviconTabHelper::FromWebContents(web_contents_)->
152 GetFavicon().AsImageSkia(); 153 GetFavicon().AsImageSkia();
153 } 154 }
154 155
155 WebContents* TabContentsResource::GetWebContents() const { 156 WebContents* TabContentsResource::GetWebContents() const {
156 return web_contents_; 157 return web_contents_;
157 } 158 }
158 159
159 const Extension* TabContentsResource::GetExtension() const { 160 const Extension* TabContentsResource::GetExtension() const {
160 if (HostsExtension()) { 161 if (HostsExtension()) {
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED: 351 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED:
351 Remove(web_contents); 352 Remove(web_contents);
352 break; 353 break;
353 default: 354 default:
354 NOTREACHED() << "Unexpected notification."; 355 NOTREACHED() << "Unexpected notification.";
355 return; 356 return;
356 } 357 }
357 } 358 }
358 359
359 } // namespace task_manager 360 } // namespace task_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698