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

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

Issue 2741053005: [Chrome OS] Clean up BrowserTabStripTracker Init parameter. (Closed)
Patch Set: . Created 3 years, 9 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 router_->UnregisterForTabNotifications(web_contents()); 134 router_->UnregisterForTabNotifications(web_contents());
135 } 135 }
136 136
137 TabsEventRouter::TabsEventRouter(Profile* profile) 137 TabsEventRouter::TabsEventRouter(Profile* profile)
138 : profile_(profile), 138 : profile_(profile),
139 favicon_scoped_observer_(this), 139 favicon_scoped_observer_(this),
140 browser_tab_strip_tracker_(this, this, this), 140 browser_tab_strip_tracker_(this, this, this),
141 tab_manager_scoped_observer_(this) { 141 tab_manager_scoped_observer_(this) {
142 DCHECK(!profile->IsOffTheRecord()); 142 DCHECK(!profile->IsOffTheRecord());
143 143
144 browser_tab_strip_tracker_.Init( 144 browser_tab_strip_tracker_.Init();
145 BrowserTabStripTracker::InitWith::ALL_BROWERS);
146 145
147 tab_manager_scoped_observer_.Add(g_browser_process->GetTabManager()); 146 tab_manager_scoped_observer_.Add(g_browser_process->GetTabManager());
148 } 147 }
149 148
150 TabsEventRouter::~TabsEventRouter() { 149 TabsEventRouter::~TabsEventRouter() {
151 } 150 }
152 151
153 bool TabsEventRouter::ShouldTrackBrowser(Browser* browser) { 152 bool TabsEventRouter::ShouldTrackBrowser(Browser* browser) {
154 return profile_->IsSameProfile(browser->profile()) && 153 return profile_->IsSameProfile(browser->profile()) &&
155 ExtensionTabUtil::BrowserSupportsTabs(browser); 154 ExtensionTabUtil::BrowserSupportsTabs(browser);
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 } 551 }
553 552
554 void TabsEventRouter::OnAutoDiscardableStateChange(WebContents* contents, 553 void TabsEventRouter::OnAutoDiscardableStateChange(WebContents* contents,
555 bool is_auto_discardable) { 554 bool is_auto_discardable) {
556 std::set<std::string> changed_property_names; 555 std::set<std::string> changed_property_names;
557 changed_property_names.insert(tabs_constants::kAutoDiscardableKey); 556 changed_property_names.insert(tabs_constants::kAutoDiscardableKey);
558 DispatchTabUpdatedEvent(contents, std::move(changed_property_names)); 557 DispatchTabUpdatedEvent(contents, std::move(changed_property_names));
559 } 558 }
560 559
561 } // namespace extensions 560 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/devtools/global_confirm_info_bar.cc ('k') | chrome/browser/extensions/api/web_navigation/web_navigation_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698