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

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs_event_router.cc

Issue 1407353012: Refactor FaviconDriver::OnFaviconAvailable() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@initial_simplify
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/tabs/tabs_event_router.h" 5 #include "chrome/browser/extensions/api/tabs/tabs_event_router.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" 8 #include "chrome/browser/extensions/api/tabs/tabs_constants.h"
9 #include "chrome/browser/extensions/api/tabs/tabs_windows_api.h" 9 #include "chrome/browser/extensions/api/tabs/tabs_windows_api.h"
10 #include "chrome/browser/extensions/api/tabs/windows_event_router.h" 10 #include "chrome/browser/extensions/api/tabs/windows_event_router.h"
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 539
540 // Dispatch the |onZoomChange| event. 540 // Dispatch the |onZoomChange| event.
541 Profile* profile = Profile::FromBrowserContext( 541 Profile* profile = Profile::FromBrowserContext(
542 data.web_contents->GetBrowserContext()); 542 data.web_contents->GetBrowserContext());
543 DispatchEvent(profile, events::TABS_ON_ZOOM_CHANGE, 543 DispatchEvent(profile, events::TABS_ON_ZOOM_CHANGE,
544 tabs::OnZoomChange::kEventName, 544 tabs::OnZoomChange::kEventName,
545 api::tabs::OnZoomChange::Create(zoom_change_info), 545 api::tabs::OnZoomChange::Create(zoom_change_info),
546 EventRouter::USER_GESTURE_UNKNOWN); 546 EventRouter::USER_GESTURE_UNKNOWN);
547 } 547 }
548 548
549 void TabsEventRouter::OnFaviconAvailable(const gfx::Image& image) { 549 void TabsEventRouter::OnFaviconUpdated(
550 } 550 favicon::FaviconDriver* favicon_driver,
551 551 NotificationIconType notification_icon_type,
552 void TabsEventRouter::OnFaviconUpdated(favicon::FaviconDriver* favicon_driver, 552 const GURL& icon_url,
553 bool icon_url_changed) { 553 bool icon_url_changed,
554 if (icon_url_changed) { 554 const gfx::Image& image) {
555 if (notification_icon_type == NON_TOUCH_16_DIP && icon_url_changed) {
555 favicon::ContentFaviconDriver* content_favicon_driver = 556 favicon::ContentFaviconDriver* content_favicon_driver =
556 static_cast<favicon::ContentFaviconDriver*>(favicon_driver); 557 static_cast<favicon::ContentFaviconDriver*>(favicon_driver);
557 FaviconUrlUpdated(content_favicon_driver->web_contents()); 558 FaviconUrlUpdated(content_favicon_driver->web_contents());
558 } 559 }
559 } 560 }
560 561
561 } // namespace extensions 562 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698