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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 313053007: Passing BackgroundColorSpan and UnderlineSpan from Clank to Blink. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Putting back import java.lang.CharSequence for android_aosp. Created 6 years, 6 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
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 "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 if (!host_) 1324 if (!host_)
1325 return; 1325 return;
1326 1326
1327 // TODO(suzhe): convert both renderer_host and renderer to use 1327 // TODO(suzhe): convert both renderer_host and renderer to use
1328 // ui::CompositionText. 1328 // ui::CompositionText.
1329 std::vector<blink::WebCompositionUnderline> underlines; 1329 std::vector<blink::WebCompositionUnderline> underlines;
1330 underlines.reserve(composition.underlines.size()); 1330 underlines.reserve(composition.underlines.size());
1331 for (std::vector<ui::CompositionUnderline>::const_iterator it = 1331 for (std::vector<ui::CompositionUnderline>::const_iterator it =
1332 composition.underlines.begin(); 1332 composition.underlines.begin();
1333 it != composition.underlines.end(); ++it) { 1333 it != composition.underlines.end(); ++it) {
1334 underlines.push_back(blink::WebCompositionUnderline(it->start_offset, 1334 underlines.push_back(
1335 it->end_offset, 1335 blink::WebCompositionUnderline(static_cast<unsigned>(it->start_offset),
1336 it->color, 1336 static_cast<unsigned>(it->end_offset),
1337 it->thick)); 1337 it->color,
1338 it->thick,
1339 it->background_color));
1338 } 1340 }
1339 1341
1340 // TODO(suzhe): due to a bug of webkit, we can't use selection range with 1342 // TODO(suzhe): due to a bug of webkit, we can't use selection range with
1341 // composition string. See: https://bugs.webkit.org/show_bug.cgi?id=37788 1343 // composition string. See: https://bugs.webkit.org/show_bug.cgi?id=37788
1342 host_->ImeSetComposition(composition.text, underlines, 1344 host_->ImeSetComposition(composition.text, underlines,
1343 composition.selection.end(), 1345 composition.selection.end(),
1344 composition.selection.end()); 1346 composition.selection.end());
1345 1347
1346 has_composition_text_ = !composition.text.empty(); 1348 has_composition_text_ = !composition.text.empty();
1347 } 1349 }
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
2440 2442
2441 //////////////////////////////////////////////////////////////////////////////// 2443 ////////////////////////////////////////////////////////////////////////////////
2442 // RenderWidgetHostViewBase, public: 2444 // RenderWidgetHostViewBase, public:
2443 2445
2444 // static 2446 // static
2445 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 2447 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
2446 GetScreenInfoForWindow(results, NULL); 2448 GetScreenInfoForWindow(results, NULL);
2447 } 2449 }
2448 2450
2449 } // namespace content 2451 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698