| 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 5244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5255 if (!find_request_manager_) | 5255 if (!find_request_manager_) |
| 5256 find_request_manager_.reset(new FindRequestManager(this)); | 5256 find_request_manager_.reset(new FindRequestManager(this)); |
| 5257 | 5257 |
| 5258 return find_request_manager_.get(); | 5258 return find_request_manager_.get(); |
| 5259 } | 5259 } |
| 5260 | 5260 |
| 5261 void WebContentsImpl::NotifyFindReply(int request_id, | 5261 void WebContentsImpl::NotifyFindReply(int request_id, |
| 5262 int number_of_matches, | 5262 int number_of_matches, |
| 5263 const gfx::Rect& selection_rect, | 5263 const gfx::Rect& selection_rect, |
| 5264 int active_match_ordinal, | 5264 int active_match_ordinal, |
| 5265 bool final_update) { | 5265 bool final_update, |
| 5266 bool was_frame_removal) { |
| 5266 if (delegate_ && !is_being_destroyed_) { | 5267 if (delegate_ && !is_being_destroyed_) { |
| 5267 delegate_->FindReply(this, request_id, number_of_matches, selection_rect, | 5268 delegate_->FindReply(this, request_id, number_of_matches, selection_rect, |
| 5268 active_match_ordinal, final_update); | 5269 active_match_ordinal, final_update, was_frame_removal); |
| 5269 } | 5270 } |
| 5270 } | 5271 } |
| 5271 | 5272 |
| 5272 void WebContentsImpl::IncrementBluetoothConnectedDeviceCount() { | 5273 void WebContentsImpl::IncrementBluetoothConnectedDeviceCount() { |
| 5273 // Trying to invalidate the tab state while being destroyed could result in a | 5274 // Trying to invalidate the tab state while being destroyed could result in a |
| 5274 // use after free. | 5275 // use after free. |
| 5275 if (IsBeingDestroyed()) { | 5276 if (IsBeingDestroyed()) { |
| 5276 return; | 5277 return; |
| 5277 } | 5278 } |
| 5278 // Notify for UI updates if the state changes. | 5279 // Notify for UI updates if the state changes. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5439 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); | 5440 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); |
| 5440 if (!render_view_host) | 5441 if (!render_view_host) |
| 5441 continue; | 5442 continue; |
| 5442 render_view_host_set.insert(render_view_host); | 5443 render_view_host_set.insert(render_view_host); |
| 5443 } | 5444 } |
| 5444 for (RenderViewHost* render_view_host : render_view_host_set) | 5445 for (RenderViewHost* render_view_host : render_view_host_set) |
| 5445 render_view_host->OnWebkitPreferencesChanged(); | 5446 render_view_host->OnWebkitPreferencesChanged(); |
| 5446 } | 5447 } |
| 5447 | 5448 |
| 5448 } // namespace content | 5449 } // namespace content |
| OLD | NEW |