OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer_host/render_view_host.h" | 5 #include "content/browser/renderer_host/render_view_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 // event. We must notify the ResourceDispatcherHost on the IO thread, | 341 // event. We must notify the ResourceDispatcherHost on the IO thread, |
342 // which we will do through the RenderProcessHost's widget helper. | 342 // which we will do through the RenderProcessHost's widget helper. |
343 process()->CrossSiteSwapOutACK(params); | 343 process()->CrossSiteSwapOutACK(params); |
344 } | 344 } |
345 } | 345 } |
346 | 346 |
347 void RenderViewHost::OnSwapOutACK() { | 347 void RenderViewHost::OnSwapOutACK() { |
348 // Stop the hang monitor now that the unload handler has finished. | 348 // Stop the hang monitor now that the unload handler has finished. |
349 StopHangMonitorTimeout(); | 349 StopHangMonitorTimeout(); |
350 is_waiting_for_unload_ack_ = false; | 350 is_waiting_for_unload_ack_ = false; |
| 351 delegate_->SwappedOut(this); |
351 } | 352 } |
352 | 353 |
353 void RenderViewHost::WasSwappedOut() { | 354 void RenderViewHost::WasSwappedOut() { |
354 // Don't bother reporting hung state anymore. | 355 // Don't bother reporting hung state anymore. |
355 StopHangMonitorTimeout(); | 356 StopHangMonitorTimeout(); |
356 | 357 |
357 // Inform the renderer that it can exit if no one else is using it. | 358 // Inform the renderer that it can exit if no one else is using it. |
358 Send(new ViewMsg_WasSwappedOut(routing_id())); | 359 Send(new ViewMsg_WasSwappedOut(routing_id())); |
359 } | 360 } |
360 | 361 |
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1498 | 1499 |
1499 void RenderViewHost::OnWebUISend(const GURL& source_url, | 1500 void RenderViewHost::OnWebUISend(const GURL& source_url, |
1500 const std::string& name, | 1501 const std::string& name, |
1501 const base::ListValue& args) { | 1502 const base::ListValue& args) { |
1502 delegate_->WebUISend(this, source_url, name, args); | 1503 delegate_->WebUISend(this, source_url, name, args); |
1503 } | 1504 } |
1504 | 1505 |
1505 void RenderViewHost::ClearPowerSaveBlockers() { | 1506 void RenderViewHost::ClearPowerSaveBlockers() { |
1506 STLDeleteValues(&power_save_blockers_); | 1507 STLDeleteValues(&power_save_blockers_); |
1507 } | 1508 } |
OLD | NEW |