| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1283 tracked_objects::ScopedTracker tracking_profile( | 1283 tracked_objects::ScopedTracker tracking_profile( |
| 1284 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 1284 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 1285 "466285 WebContentsImpl::NotifyNavigationStateChanged")); | 1285 "466285 WebContentsImpl::NotifyNavigationStateChanged")); |
| 1286 // Notify the media observer of potential audibility changes. | 1286 // Notify the media observer of potential audibility changes. |
| 1287 if (changed_flags & INVALIDATE_TYPE_TAB) { | 1287 if (changed_flags & INVALIDATE_TYPE_TAB) { |
| 1288 media_web_contents_observer_->MaybeUpdateAudibleState(); | 1288 media_web_contents_observer_->MaybeUpdateAudibleState(); |
| 1289 } | 1289 } |
| 1290 | 1290 |
| 1291 if (delegate_) | 1291 if (delegate_) |
| 1292 delegate_->NavigationStateChanged(this, changed_flags); | 1292 delegate_->NavigationStateChanged(this, changed_flags); |
| 1293 |
| 1294 if (GetOuterWebContents()) |
| 1295 GetOuterWebContents()->NotifyNavigationStateChanged(changed_flags); |
| 1293 } | 1296 } |
| 1294 | 1297 |
| 1295 base::TimeTicks WebContentsImpl::GetLastActiveTime() const { | 1298 base::TimeTicks WebContentsImpl::GetLastActiveTime() const { |
| 1296 return last_active_time_; | 1299 return last_active_time_; |
| 1297 } | 1300 } |
| 1298 | 1301 |
| 1299 void WebContentsImpl::SetLastActiveTime(base::TimeTicks last_active_time) { | 1302 void WebContentsImpl::SetLastActiveTime(base::TimeTicks last_active_time) { |
| 1300 last_active_time_ = last_active_time; | 1303 last_active_time_ = last_active_time; |
| 1301 } | 1304 } |
| 1302 | 1305 |
| (...skipping 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3037 | 3040 |
| 3038 GetOrCreateFindRequestManager()->StopFinding(action); | 3041 GetOrCreateFindRequestManager()->StopFinding(action); |
| 3039 } | 3042 } |
| 3040 | 3043 |
| 3041 void WebContentsImpl::InsertCSS(const std::string& css) { | 3044 void WebContentsImpl::InsertCSS(const std::string& css) { |
| 3042 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest( | 3045 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest( |
| 3043 GetMainFrame()->GetRoutingID(), css)); | 3046 GetMainFrame()->GetRoutingID(), css)); |
| 3044 } | 3047 } |
| 3045 | 3048 |
| 3046 bool WebContentsImpl::WasRecentlyAudible() { | 3049 bool WebContentsImpl::WasRecentlyAudible() { |
| 3047 return audio_stream_monitor_.WasRecentlyAudible(); | 3050 return audio_stream_monitor_.WasRecentlyAudible() || |
| 3051 (browser_plugin_embedder_ && |
| 3052 browser_plugin_embedder_->WereAnyGuestsRecentlyAudible()); |
| 3048 } | 3053 } |
| 3049 | 3054 |
| 3050 void WebContentsImpl::GetManifest(const GetManifestCallback& callback) { | 3055 void WebContentsImpl::GetManifest(const GetManifestCallback& callback) { |
| 3051 manifest_manager_host_->GetManifest(GetMainFrame(), callback); | 3056 manifest_manager_host_->GetManifest(GetMainFrame(), callback); |
| 3052 } | 3057 } |
| 3053 | 3058 |
| 3054 void WebContentsImpl::HasManifest(const HasManifestCallback& callback) { | 3059 void WebContentsImpl::HasManifest(const HasManifestCallback& callback) { |
| 3055 manifest_manager_host_->HasManifest(GetMainFrame(), callback); | 3060 manifest_manager_host_->HasManifest(GetMainFrame(), callback); |
| 3056 } | 3061 } |
| 3057 | 3062 |
| (...skipping 1974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5032 for (RenderViewHost* render_view_host : render_view_host_set) | 5037 for (RenderViewHost* render_view_host : render_view_host_set) |
| 5033 render_view_host->OnWebkitPreferencesChanged(); | 5038 render_view_host->OnWebkitPreferencesChanged(); |
| 5034 } | 5039 } |
| 5035 | 5040 |
| 5036 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 5041 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
| 5037 JavaScriptDialogManager* dialog_manager) { | 5042 JavaScriptDialogManager* dialog_manager) { |
| 5038 dialog_manager_ = dialog_manager; | 5043 dialog_manager_ = dialog_manager; |
| 5039 } | 5044 } |
| 5040 | 5045 |
| 5041 } // namespace content | 5046 } // namespace content |
| OLD | NEW |