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

Side by Side Diff: extensions/browser/extension_host.cc

Issue 1743143002: Remove WebContents::Was{Hidden,Shown}() from the content public interface Base URL: https://chromium.googlesource.com/chromium/src.git@20160225-WebContents-DicardCursorRects
Patch Set: Fix androido Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/extension_host.h" 5 #include "extensions/browser/extension_host.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "base/profiler/scoped_tracker.h" 10 #include "base/profiler/scoped_tracker.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 FROM_HERE_WITH_EXPLICIT_FUNCTION( 163 FROM_HERE_WITH_EXPLICIT_FUNCTION(
164 "464206 ExtensionHost::CreateRenderViewNow2")); 164 "464206 ExtensionHost::CreateRenderViewNow2"));
165 DCHECK(IsRenderViewLive()); 165 DCHECK(IsRenderViewLive());
166 if (extension_) { 166 if (extension_) {
167 std::string group_name = base::FieldTrialList::FindFullName( 167 std::string group_name = base::FieldTrialList::FindFullName(
168 "ThrottleExtensionBackgroundPages"); 168 "ThrottleExtensionBackgroundPages");
169 if ((group_name == "ThrottlePersistent" && 169 if ((group_name == "ThrottlePersistent" &&
170 extensions::BackgroundInfo::HasPersistentBackgroundPage( 170 extensions::BackgroundInfo::HasPersistentBackgroundPage(
171 extension_)) || 171 extension_)) ||
172 group_name == "ThrottleAll") { 172 group_name == "ThrottleAll") {
173 host_contents_->WasHidden(); 173 host_contents_->MarkBackgrounded();
174 } 174 }
175 } 175 }
176 // TODO(robliao): Remove ScopedTracker below once crbug.com/464206 is fixed. 176 // TODO(robliao): Remove ScopedTracker below once crbug.com/464206 is fixed.
177 tracked_objects::ScopedTracker tracking_profile3( 177 tracked_objects::ScopedTracker tracking_profile3(
178 FROM_HERE_WITH_EXPLICIT_FUNCTION( 178 FROM_HERE_WITH_EXPLICIT_FUNCTION(
179 "464206 ExtensionHost::CreateRenderViewNow3")); 179 "464206 ExtensionHost::CreateRenderViewNow3"));
180 // Connect orphaned dev-tools instances. 180 // Connect orphaned dev-tools instances.
181 delegate_->OnRenderViewCreatedForBackgroundPage(this); 181 delegate_->OnRenderViewCreatedForBackgroundPage(this);
182 } 182 }
183 } 183 }
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 } 486 }
487 } else if (extension_host_type_ == VIEW_TYPE_EXTENSION_POPUP) { 487 } else if (extension_host_type_ == VIEW_TYPE_EXTENSION_POPUP) {
488 UMA_HISTOGRAM_MEDIUM_TIMES("Extensions.PopupLoadTime2", 488 UMA_HISTOGRAM_MEDIUM_TIMES("Extensions.PopupLoadTime2",
489 load_start_->Elapsed()); 489 load_start_->Elapsed());
490 UMA_HISTOGRAM_MEDIUM_TIMES("Extensions.PopupCreateTime", 490 UMA_HISTOGRAM_MEDIUM_TIMES("Extensions.PopupCreateTime",
491 create_start_.Elapsed()); 491 create_start_.Elapsed());
492 } 492 }
493 } 493 }
494 494
495 } // namespace extensions 495 } // namespace extensions
OLDNEW
« content/public/browser/web_contents.h ('K') | « content/public/test/web_contents_tester.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698