| 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_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 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1350 // TODO(suzhe): convert both renderer_host and renderer to use | 1350 // TODO(suzhe): convert both renderer_host and renderer to use |
| 1351 // ui::CompositionText. | 1351 // ui::CompositionText. |
| 1352 std::vector<blink::WebCompositionUnderline> underlines; | 1352 std::vector<blink::WebCompositionUnderline> underlines; |
| 1353 underlines.reserve(composition.underlines.size()); | 1353 underlines.reserve(composition.underlines.size()); |
| 1354 for (std::vector<ui::CompositionUnderline>::const_iterator it = | 1354 for (std::vector<ui::CompositionUnderline>::const_iterator it = |
| 1355 composition.underlines.begin(); | 1355 composition.underlines.begin(); |
| 1356 it != composition.underlines.end(); ++it) { | 1356 it != composition.underlines.end(); ++it) { |
| 1357 underlines.push_back(blink::WebCompositionUnderline(it->start_offset, | 1357 underlines.push_back(blink::WebCompositionUnderline(it->start_offset, |
| 1358 it->end_offset, | 1358 it->end_offset, |
| 1359 it->color, | 1359 it->color, |
| 1360 it->thick)); | 1360 it->thick, |
| 1361 it->background_color)); |
| 1361 } | 1362 } |
| 1362 | 1363 |
| 1363 // TODO(suzhe): due to a bug of webkit, we can't use selection range with | 1364 // TODO(suzhe): due to a bug of webkit, we can't use selection range with |
| 1364 // composition string. See: https://bugs.webkit.org/show_bug.cgi?id=37788 | 1365 // composition string. See: https://bugs.webkit.org/show_bug.cgi?id=37788 |
| 1365 host_->ImeSetComposition(composition.text, underlines, | 1366 host_->ImeSetComposition(composition.text, underlines, |
| 1366 composition.selection.end(), | 1367 composition.selection.end(), |
| 1367 composition.selection.end()); | 1368 composition.selection.end()); |
| 1368 | 1369 |
| 1369 has_composition_text_ = !composition.text.empty(); | 1370 has_composition_text_ = !composition.text.empty(); |
| 1370 } | 1371 } |
| (...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2463 | 2464 |
| 2464 //////////////////////////////////////////////////////////////////////////////// | 2465 //////////////////////////////////////////////////////////////////////////////// |
| 2465 // RenderWidgetHostViewBase, public: | 2466 // RenderWidgetHostViewBase, public: |
| 2466 | 2467 |
| 2467 // static | 2468 // static |
| 2468 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2469 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2469 GetScreenInfoForWindow(results, NULL); | 2470 GetScreenInfoForWindow(results, NULL); |
| 2470 } | 2471 } |
| 2471 | 2472 |
| 2472 } // namespace content | 2473 } // namespace content |
| OLD | NEW |