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

Unified Diff: mojo/services/html_viewer/blink_basic_type_converters.cc

Issue 1099303002: Move html_viewer from mojo/services to components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 8 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
Index: mojo/services/html_viewer/blink_basic_type_converters.cc
diff --git a/mojo/services/html_viewer/blink_basic_type_converters.cc b/mojo/services/html_viewer/blink_basic_type_converters.cc
deleted file mode 100644
index 5324a7c3df73f41f8cbca8059b0b0c466ed90d74..0000000000000000000000000000000000000000
--- a/mojo/services/html_viewer/blink_basic_type_converters.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2014 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 "mojo/services/html_viewer/blink_basic_type_converters.h"
-
-#include "third_party/WebKit/public/platform/WebRect.h"
-#include "third_party/WebKit/public/platform/WebString.h"
-#include "third_party/mojo/src/mojo/public/cpp/bindings/string.h"
-
-using blink::WebRect;
-using blink::WebString;
-
-namespace mojo {
-
-// static
-String TypeConverter<String, WebString>::Convert(const WebString& str) {
- return String(str.utf8());
-}
-
-// static
-WebString TypeConverter<WebString, String>::Convert(const String& str) {
- return WebString::fromUTF8(str.get());
-}
-
-// static
-RectPtr TypeConverter<RectPtr, WebRect>::Convert(const WebRect& input) {
- RectPtr result(Rect::New());
- result->x = input.x;
- result->y = input.y;
- result->width = input.width;
- result->height = input.height;
- return result.Pass();
-};
-
-// static
-Array<uint8_t> TypeConverter<Array<uint8_t>, blink::WebString>::Convert(
- const blink::WebString& input) {
- std::string utf8 = input.utf8();
- Array<uint8_t> result(utf8.size());
- for (size_t i = 0; i < utf8.size(); ++i)
- result[i] = utf8[i];
- return result.Pass();
-}
-
-} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698