| 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 "android_webview/browser/renderer_host/aw_render_view_host_ext.h" | 5 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/aw_browser_context.h" | 7 #include "android_webview/browser/aw_browser_context.h" |
| 8 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" | 8 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" |
| 9 #include "android_webview/common/aw_switches.h" | 9 #include "android_webview/common/aw_switches.h" |
| 10 #include "android_webview/common/render_view_messages.h" | 10 #include "android_webview/common/render_view_messages.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 void AwRenderViewHostExt::SetBackgroundColor(SkColor c) { | 89 void AwRenderViewHostExt::SetBackgroundColor(SkColor c) { |
| 90 if (background_color_ == c) | 90 if (background_color_ == c) |
| 91 return; | 91 return; |
| 92 background_color_ = c; | 92 background_color_ = c; |
| 93 if (web_contents()->GetRenderViewHost()) { | 93 if (web_contents()->GetRenderViewHost()) { |
| 94 Send(new AwViewMsg_SetBackgroundColor(web_contents()->GetRoutingID(), | 94 Send(new AwViewMsg_SetBackgroundColor(web_contents()->GetRoutingID(), |
| 95 background_color_)); | 95 background_color_)); |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 | 98 |
| 99 void AwRenderViewHostExt::SetJsOnlineProperty(bool network_up) { |
| 100 Send(new AwViewMsg_SetJsOnlineProperty(network_up)); |
| 101 } |
| 102 |
| 99 void AwRenderViewHostExt::RenderViewCreated( | 103 void AwRenderViewHostExt::RenderViewCreated( |
| 100 content::RenderViewHost* render_view_host) { | 104 content::RenderViewHost* render_view_host) { |
| 101 Send(new AwViewMsg_SetBackgroundColor(web_contents()->GetRoutingID(), | 105 Send(new AwViewMsg_SetBackgroundColor(web_contents()->GetRoutingID(), |
| 102 background_color_)); | 106 background_color_)); |
| 103 } | 107 } |
| 104 | 108 |
| 105 void AwRenderViewHostExt::RenderProcessGone(base::TerminationStatus status) { | 109 void AwRenderViewHostExt::RenderProcessGone(base::TerminationStatus status) { |
| 106 DCHECK(CalledOnValidThread()); | 110 DCHECK(CalledOnValidThread()); |
| 107 for (std::map<int, DocumentHasImagesResult>::iterator pending_req = | 111 for (std::map<int, DocumentHasImagesResult>::iterator pending_req = |
| 108 pending_document_has_images_requests_.begin(); | 112 pending_document_has_images_requests_.begin(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 DCHECK(CalledOnValidThread()); | 158 DCHECK(CalledOnValidThread()); |
| 155 last_hit_test_data_ = hit_test_data; | 159 last_hit_test_data_ = hit_test_data; |
| 156 has_new_hit_test_data_ = true; | 160 has_new_hit_test_data_ = true; |
| 157 } | 161 } |
| 158 | 162 |
| 159 void AwRenderViewHostExt::OnPageScaleFactorChanged(float page_scale_factor) { | 163 void AwRenderViewHostExt::OnPageScaleFactorChanged(float page_scale_factor) { |
| 160 client_->OnWebLayoutPageScaleFactorChanged(page_scale_factor); | 164 client_->OnWebLayoutPageScaleFactorChanged(page_scale_factor); |
| 161 } | 165 } |
| 162 | 166 |
| 163 } // namespace android_webview | 167 } // namespace android_webview |
| OLD | NEW |