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/renderer/aw_render_view_ext.h" | 5 #include "android_webview/renderer/aw_render_view_ext.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "android_webview/common/aw_hit_test_data.h" | 9 #include "android_webview/common/aw_hit_test_data.h" |
10 #include "android_webview/common/render_view_messages.h" | 10 #include "android_webview/common/render_view_messages.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 } else if (has_link_url && has_image_url && !is_javascript_scheme) { | 126 } else if (has_link_url && has_image_url && !is_javascript_scheme) { |
127 data->type = AwHitTestData::SRC_IMAGE_LINK_TYPE; | 127 data->type = AwHitTestData::SRC_IMAGE_LINK_TYPE; |
128 data->extra_data_for_type = data->img_src.possibly_invalid_spec(); | 128 data->extra_data_for_type = data->img_src.possibly_invalid_spec(); |
129 if (absolute_link_url.is_valid()) | 129 if (absolute_link_url.is_valid()) |
130 data->href = base::UTF8ToUTF16(absolute_link_url.possibly_invalid_spec()); | 130 data->href = base::UTF8ToUTF16(absolute_link_url.possibly_invalid_spec()); |
131 } else if (!has_link_url && has_image_url) { | 131 } else if (!has_link_url && has_image_url) { |
132 data->type = AwHitTestData::IMAGE_TYPE; | 132 data->type = AwHitTestData::IMAGE_TYPE; |
133 data->extra_data_for_type = data->img_src.possibly_invalid_spec(); | 133 data->extra_data_for_type = data->img_src.possibly_invalid_spec(); |
134 } else if (is_editable) { | 134 } else if (is_editable) { |
135 data->type = AwHitTestData::EDIT_TEXT_TYPE; | 135 data->type = AwHitTestData::EDIT_TEXT_TYPE; |
136 DCHECK(data->extra_data_for_type.length() == 0); | 136 DCHECK_EQ(0u, data->extra_data_for_type.length()); |
137 } | 137 } |
138 } | 138 } |
139 | 139 |
140 } // namespace | 140 } // namespace |
141 | 141 |
142 AwRenderViewExt::AwRenderViewExt(content::RenderView* render_view) | 142 AwRenderViewExt::AwRenderViewExt(content::RenderView* render_view) |
143 : content::RenderViewObserver(render_view), page_scale_factor_(0.0f) { | 143 : content::RenderViewObserver(render_view), page_scale_factor_(0.0f) { |
144 } | 144 } |
145 | 145 |
146 AwRenderViewExt::~AwRenderViewExt() { | 146 AwRenderViewExt::~AwRenderViewExt() { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 render_view()->GetWebView()->setFixedLayoutSize(size); | 313 render_view()->GetWebView()->setFixedLayoutSize(size); |
314 } | 314 } |
315 | 315 |
316 void AwRenderViewExt::OnSetBackgroundColor(SkColor c) { | 316 void AwRenderViewExt::OnSetBackgroundColor(SkColor c) { |
317 if (!render_view() || !render_view()->GetWebView()) | 317 if (!render_view() || !render_view()->GetWebView()) |
318 return; | 318 return; |
319 render_view()->GetWebView()->setBaseBackgroundColor(c); | 319 render_view()->GetWebView()->setBaseBackgroundColor(c); |
320 } | 320 } |
321 | 321 |
322 } // namespace android_webview | 322 } // namespace android_webview |
OLD | NEW |