| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |