| 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/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1757 content::NotificationService::current()->Notify( | 1757 content::NotificationService::current()->Notify( |
| 1758 content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED, | 1758 content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED, |
| 1759 content::Source<RenderViewHost>(this), | 1759 content::Source<RenderViewHost>(this), |
| 1760 content::NotificationService::NoDetails()); | 1760 content::NotificationService::NoDetails()); |
| 1761 } | 1761 } |
| 1762 | 1762 |
| 1763 Send(new AccessibilityMsg_Notifications_ACK(GetRoutingID())); | 1763 Send(new AccessibilityMsg_Notifications_ACK(GetRoutingID())); |
| 1764 } | 1764 } |
| 1765 | 1765 |
| 1766 void RenderViewHostImpl::OnScriptEvalResponse(int id, const ListValue& result) { | 1766 void RenderViewHostImpl::OnScriptEvalResponse(int id, const ListValue& result) { |
| 1767 Value* result_value; | 1767 const Value* result_value; |
| 1768 if (!result.Get(0, &result_value)) { | 1768 if (!result.Get(0, &result_value)) { |
| 1769 // Programming error or rogue renderer. | 1769 // Programming error or rogue renderer. |
| 1770 NOTREACHED() << "Got bad arguments for OnScriptEvalResponse"; | 1770 NOTREACHED() << "Got bad arguments for OnScriptEvalResponse"; |
| 1771 return; | 1771 return; |
| 1772 } | 1772 } |
| 1773 std::pair<int, Value*> details(id, result_value); | 1773 std::pair<int, const Value*> details(id, result_value); |
| 1774 content::NotificationService::current()->Notify( | 1774 content::NotificationService::current()->Notify( |
| 1775 content::NOTIFICATION_EXECUTE_JAVASCRIPT_RESULT, | 1775 content::NOTIFICATION_EXECUTE_JAVASCRIPT_RESULT, |
| 1776 content::Source<RenderViewHost>(this), | 1776 content::Source<RenderViewHost>(this), |
| 1777 content::Details<std::pair<int, Value*> >(&details)); | 1777 content::Details<std::pair<int, const Value*> >(&details)); |
| 1778 } | 1778 } |
| 1779 | 1779 |
| 1780 void RenderViewHostImpl::OnDidZoomURL(double zoom_level, | 1780 void RenderViewHostImpl::OnDidZoomURL(double zoom_level, |
| 1781 bool remember, | 1781 bool remember, |
| 1782 const GURL& url) { | 1782 const GURL& url) { |
| 1783 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( | 1783 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( |
| 1784 HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext())); | 1784 HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext())); |
| 1785 if (remember) { | 1785 if (remember) { |
| 1786 host_zoom_map->SetZoomLevel(net::GetHostOrSpecFromURL(url), zoom_level); | 1786 host_zoom_map->SetZoomLevel(net::GetHostOrSpecFromURL(url), zoom_level); |
| 1787 } else { | 1787 } else { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1885 // can cause navigations to be ignored in OnMsgNavigate. | 1885 // can cause navigations to be ignored in OnMsgNavigate. |
| 1886 is_waiting_for_beforeunload_ack_ = false; | 1886 is_waiting_for_beforeunload_ack_ = false; |
| 1887 is_waiting_for_unload_ack_ = false; | 1887 is_waiting_for_unload_ack_ = false; |
| 1888 } | 1888 } |
| 1889 | 1889 |
| 1890 void RenderViewHostImpl::ClearPowerSaveBlockers() { | 1890 void RenderViewHostImpl::ClearPowerSaveBlockers() { |
| 1891 STLDeleteValues(&power_save_blockers_); | 1891 STLDeleteValues(&power_save_blockers_); |
| 1892 } | 1892 } |
| 1893 | 1893 |
| 1894 } // namespace content | 1894 } // namespace content |
| OLD | NEW |