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

Side by Side Diff: chrome/browser/metrics/tab_reactivation_tracker.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
« no previous file with comments | « chrome/browser/memory/tab_manager.cc ('k') | chrome/browser/metrics/tab_usage_recorder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/metrics/tab_reactivation_tracker.h" 5 #include "chrome/browser/metrics/tab_reactivation_tracker.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "content/public/browser/web_contents_observer.h" 9 #include "content/public/browser/web_contents_observer.h"
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 if (!is_closing_) 64 if (!is_closing_)
65 tab_reactivation_tracker_->NotifyTabDeactivating(web_contents()); 65 tab_reactivation_tracker_->NotifyTabDeactivating(web_contents());
66 } 66 }
67 67
68 void TabReactivationTracker::WebContentsHelper::OnTabClosing() { 68 void TabReactivationTracker::WebContentsHelper::OnTabClosing() {
69 is_closing_ = true; 69 is_closing_ = true;
70 } 70 }
71 71
72 TabReactivationTracker::TabReactivationTracker(Delegate* delegate) 72 TabReactivationTracker::TabReactivationTracker(Delegate* delegate)
73 : delegate_(delegate), browser_tab_strip_tracker_(this, nullptr, nullptr) { 73 : delegate_(delegate), browser_tab_strip_tracker_(this, nullptr, nullptr) {
74 browser_tab_strip_tracker_.Init( 74 browser_tab_strip_tracker_.Init();
75 BrowserTabStripTracker::InitWith::ALL_BROWERS);
76 } 75 }
77 76
78 TabReactivationTracker::~TabReactivationTracker() = default; 77 TabReactivationTracker::~TabReactivationTracker() = default;
79 78
80 void TabReactivationTracker::TabInsertedAt(TabStripModel* tab_strip_model, 79 void TabReactivationTracker::TabInsertedAt(TabStripModel* tab_strip_model,
81 content::WebContents* contents, 80 content::WebContents* contents,
82 int index, 81 int index,
83 bool foreground) {} 82 bool foreground) {}
84 83
85 void TabReactivationTracker::TabClosingAt(TabStripModel* tab_strip_model, 84 void TabReactivationTracker::TabClosingAt(TabStripModel* tab_strip_model,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 117
119 return helper_map_[contents].get(); 118 return helper_map_[contents].get();
120 } 119 }
121 120
122 void TabReactivationTracker::OnWebContentsDestroyed( 121 void TabReactivationTracker::OnWebContentsDestroyed(
123 content::WebContents* contents) { 122 content::WebContents* contents) {
124 helper_map_.erase(contents); 123 helper_map_.erase(contents);
125 } 124 }
126 125
127 } // namespace metrics 126 } // namespace metrics
OLDNEW
« no previous file with comments | « chrome/browser/memory/tab_manager.cc ('k') | chrome/browser/metrics/tab_usage_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698