Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: android_webview/renderer/aw_render_view_ext.cc

Issue 23283007: Move kJavaScriptScheme into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: content:: is necessary in web_drag_source_mac.mm Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_input.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 bool is_editable, 115 bool is_editable,
116 AwHitTestData* data) { 116 AwHitTestData* data) {
117 // Note: Using GURL::is_empty instead of GURL:is_valid due to the 117 // Note: Using GURL::is_empty instead of GURL:is_valid due to the
118 // WebViewClassic allowing any kind of protocol which GURL::is_valid 118 // WebViewClassic allowing any kind of protocol which GURL::is_valid
119 // disallows. Similar reasons for using GURL::possibly_invalid_spec instead of 119 // disallows. Similar reasons for using GURL::possibly_invalid_spec instead of
120 // GURL::spec. 120 // GURL::spec.
121 if (!absolute_image_url.is_empty()) 121 if (!absolute_image_url.is_empty())
122 data->img_src = absolute_image_url; 122 data->img_src = absolute_image_url;
123 123
124 const bool is_javascript_scheme = 124 const bool is_javascript_scheme =
125 absolute_link_url.SchemeIs(chrome::kJavaScriptScheme); 125 absolute_link_url.SchemeIs(content::kJavaScriptScheme);
126 const bool has_link_url = !absolute_link_url.is_empty(); 126 const bool has_link_url = !absolute_link_url.is_empty();
127 const bool has_image_url = !absolute_image_url.is_empty(); 127 const bool has_image_url = !absolute_image_url.is_empty();
128 128
129 if (has_link_url && !has_image_url && !is_javascript_scheme) { 129 if (has_link_url && !has_image_url && !is_javascript_scheme) {
130 DistinguishAndAssignSrcLinkType(absolute_link_url, data); 130 DistinguishAndAssignSrcLinkType(absolute_link_url, data);
131 } else if (has_link_url && has_image_url && !is_javascript_scheme) { 131 } else if (has_link_url && has_image_url && !is_javascript_scheme) {
132 data->type = AwHitTestData::SRC_IMAGE_LINK_TYPE; 132 data->type = AwHitTestData::SRC_IMAGE_LINK_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 (!has_link_url && has_image_url) { 134 } else if (!has_link_url && has_image_url) {
135 data->type = AwHitTestData::IMAGE_TYPE; 135 data->type = AwHitTestData::IMAGE_TYPE;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 page_scale_factor); 304 page_scale_factor);
305 } 305 }
306 306
307 void AwRenderViewExt::OnSetBackgroundColor(SkColor c) { 307 void AwRenderViewExt::OnSetBackgroundColor(SkColor c) {
308 if (!render_view() || !render_view()->GetWebView()) 308 if (!render_view() || !render_view()->GetWebView())
309 return; 309 return;
310 render_view()->GetWebView()->setBaseBackgroundColor(c); 310 render_view()->GetWebView()->setBaseBackgroundColor(c);
311 } 311 }
312 312
313 } // namespace android_webview 313 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698