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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1532873003: PlzNavigate: add initial traces for new TBM benchmarks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 3564 matching lines...) Expand 10 before | Expand all | Expand 10 after
3575 is_loading_ = is_loading; 3575 is_loading_ = is_loading;
3576 waiting_for_response_ = is_loading; 3576 waiting_for_response_ = is_loading;
3577 is_load_to_different_document_ = to_different_document; 3577 is_load_to_different_document_ = to_different_document;
3578 3578
3579 if (delegate_) 3579 if (delegate_)
3580 delegate_->LoadingStateChanged(this, to_different_document); 3580 delegate_->LoadingStateChanged(this, to_different_document);
3581 NotifyNavigationStateChanged(INVALIDATE_TYPE_LOAD); 3581 NotifyNavigationStateChanged(INVALIDATE_TYPE_LOAD);
3582 3582
3583 std::string url = (details ? details->url.possibly_invalid_spec() : "NULL"); 3583 std::string url = (details ? details->url.possibly_invalid_spec() : "NULL");
3584 if (is_loading) { 3584 if (is_loading) {
3585 TRACE_EVENT_ASYNC_BEGIN1("browser,navigation", "WebContentsImpl Loading", 3585 TRACE_EVENT_ASYNC_BEGIN2("browser,navigation", "WebContentsImpl Loading",
3586 this, "URL", url); 3586 this, "URL", url, "Main FrameTreeNode id",
3587 GetFrameTree()->root()->frame_tree_node_id());
3587 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidStartLoading()); 3588 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidStartLoading());
3588 } else { 3589 } else {
3589 TRACE_EVENT_ASYNC_END1("browser,navigation", "WebContentsImpl Loading", 3590 TRACE_EVENT_ASYNC_END1("browser,navigation", "WebContentsImpl Loading",
3590 this, "URL", url); 3591 this, "URL", url);
3591 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidStopLoading()); 3592 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidStopLoading());
3592 } 3593 }
3593 3594
3594 // TODO(avi): Remove. http://crbug.com/170921 3595 // TODO(avi): Remove. http://crbug.com/170921
3595 int type = is_loading ? NOTIFICATION_LOAD_START : NOTIFICATION_LOAD_STOP; 3596 int type = is_loading ? NOTIFICATION_LOAD_START : NOTIFICATION_LOAD_STOP;
3596 NotificationDetails det = NotificationService::NoDetails(); 3597 NotificationDetails det = NotificationService::NoDetails();
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after
4719 const WebContentsObserver::MediaPlayerId& id) { 4720 const WebContentsObserver::MediaPlayerId& id) {
4720 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); 4721 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id));
4721 } 4722 }
4722 4723
4723 void WebContentsImpl::MediaStoppedPlaying( 4724 void WebContentsImpl::MediaStoppedPlaying(
4724 const WebContentsObserver::MediaPlayerId& id) { 4725 const WebContentsObserver::MediaPlayerId& id) {
4725 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); 4726 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id));
4726 } 4727 }
4727 4728
4728 } // namespace content 4729 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698