| 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 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3038 | 3041 |
| 3039 GetOrCreateFindRequestManager()->StopFinding(action); | 3042 GetOrCreateFindRequestManager()->StopFinding(action); |
| 3040 } | 3043 } |
| 3041 | 3044 |
| 3042 void WebContentsImpl::InsertCSS(const std::string& css) { | 3045 void WebContentsImpl::InsertCSS(const std::string& css) { |
| 3043 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest( | 3046 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest( |
| 3044 GetMainFrame()->GetRoutingID(), css)); | 3047 GetMainFrame()->GetRoutingID(), css)); |
| 3045 } | 3048 } |
| 3046 | 3049 |
| 3047 bool WebContentsImpl::WasRecentlyAudible() { | 3050 bool WebContentsImpl::WasRecentlyAudible() { |
| 3048 return audio_stream_monitor_.WasRecentlyAudible(); | 3051 return audio_stream_monitor_.WasRecentlyAudible() || |
| 3052 (browser_plugin_embedder_ && |
| 3053 browser_plugin_embedder_->WereAnyGuestsRecentlyAudible()); |
| 3049 } | 3054 } |
| 3050 | 3055 |
| 3051 void WebContentsImpl::GetManifest(const GetManifestCallback& callback) { | 3056 void WebContentsImpl::GetManifest(const GetManifestCallback& callback) { |
| 3052 manifest_manager_host_->GetManifest(GetMainFrame(), callback); | 3057 manifest_manager_host_->GetManifest(GetMainFrame(), callback); |
| 3053 } | 3058 } |
| 3054 | 3059 |
| 3055 void WebContentsImpl::HasManifest(const HasManifestCallback& callback) { | 3060 void WebContentsImpl::HasManifest(const HasManifestCallback& callback) { |
| 3056 manifest_manager_host_->HasManifest(GetMainFrame(), callback); | 3061 manifest_manager_host_->HasManifest(GetMainFrame(), callback); |
| 3057 } | 3062 } |
| 3058 | 3063 |
| (...skipping 1974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5033 for (RenderViewHost* render_view_host : render_view_host_set) | 5038 for (RenderViewHost* render_view_host : render_view_host_set) |
| 5034 render_view_host->OnWebkitPreferencesChanged(); | 5039 render_view_host->OnWebkitPreferencesChanged(); |
| 5035 } | 5040 } |
| 5036 | 5041 |
| 5037 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 5042 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
| 5038 JavaScriptDialogManager* dialog_manager) { | 5043 JavaScriptDialogManager* dialog_manager) { |
| 5039 dialog_manager_ = dialog_manager; | 5044 dialog_manager_ = dialog_manager; |
| 5040 } | 5045 } |
| 5041 | 5046 |
| 5042 } // namespace content | 5047 } // namespace content |
| OLD | NEW |