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

Unified Diff: app/bidi_line_iterator.cc

Issue 6257006: Move a bunch of random other files to src/ui/base... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « app/bidi_line_iterator.h ('k') | app/event_synthesis_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/bidi_line_iterator.cc
===================================================================
--- app/bidi_line_iterator.cc (revision 71854)
+++ app/bidi_line_iterator.cc (working copy)
@@ -1,53 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "app/bidi_line_iterator.h"
-
-#include "base/logging.h"
-#include "base/string16.h"
-#include "base/utf_string_conversions.h"
-
-BiDiLineIterator::~BiDiLineIterator() {
- if (bidi_) {
- ubidi_close(bidi_);
- bidi_ = NULL;
- }
-}
-
-UBool BiDiLineIterator::Open(const string16& text,
- bool right_to_left,
- bool url) {
- DCHECK(bidi_ == NULL);
- UErrorCode error = U_ZERO_ERROR;
- bidi_ = ubidi_openSized(static_cast<int>(text.length()), 0, &error);
- if (U_FAILURE(error))
- return false;
- if (right_to_left && url)
- ubidi_setReorderingMode(bidi_, UBIDI_REORDER_RUNS_ONLY);
- ubidi_setPara(bidi_, text.data(), static_cast<int>(text.length()),
- right_to_left ? UBIDI_DEFAULT_RTL : UBIDI_DEFAULT_LTR,
- NULL, &error);
- return U_SUCCESS(error);
-}
-
-int BiDiLineIterator::CountRuns() {
- DCHECK(bidi_ != NULL);
- UErrorCode error = U_ZERO_ERROR;
- const int runs = ubidi_countRuns(bidi_, &error);
- return U_SUCCESS(error) ? runs : 0;
-}
-
-UBiDiDirection BiDiLineIterator::GetVisualRun(int index,
- int* start,
- int* length) {
- DCHECK(bidi_ != NULL);
- return ubidi_getVisualRun(bidi_, index, start, length);
-}
-
-void BiDiLineIterator::GetLogicalRun(int start,
- int* end,
- UBiDiLevel* level) {
- DCHECK(bidi_ != NULL);
- ubidi_getLogicalRun(bidi_, start, end, level);
-}
« no previous file with comments | « app/bidi_line_iterator.h ('k') | app/event_synthesis_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698