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

Unified Diff: content/common/common_param_traits.cc

Issue 6289009: [Mac] Implement the system dictionary popup by implementing NSTextInput methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Create AttributedStringCoder Created 9 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: content/common/common_param_traits.cc
diff --git a/content/common/common_param_traits.cc b/content/common/common_param_traits.cc
index 8694bb282ebcd98dc05aadfad90efb2c01ca8f41..3d52a1a214ff7cda6ec28c916a5dcd1194fcf95b 100644
--- a/content/common/common_param_traits.cc
+++ b/content/common/common_param_traits.cc
@@ -10,6 +10,7 @@
#include "net/http/http_response_headers.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/base/range/range.h"
#include "ui/gfx/rect.h"
#include "webkit/glue/password_form.h"
#include "webkit/glue/resource_loader_bridge.h"
@@ -611,6 +612,24 @@ void ParamTraits<gfx::Rect>::Log(const gfx::Rect& p, std::string* l) {
p.width(), p.height()));
}
+void ParamTraits<ui::Range>::Write(Message* m, const ui::Range& r) {
+ m->WriteSize(r.start());
+ m->WriteSize(r.end());
+}
+
+bool ParamTraits<ui::Range>::Read(const Message* m, void** iter, ui::Range* r) {
+ size_t start, end;
+ if (!m->ReadSize(iter, &start) || !m->ReadSize(iter, &end))
+ return false;
+ r->set_start(start);
+ r->set_end(end);
+ return true;
+}
+
+void ParamTraits<ui::Range>::Log(const ui::Range& r, std::string* l) {
+ l->append(base::StringPrintf("(%"PRIuS", %"PRIuS")", r.start(), r.end()));
+}
+
// Only the webkit_blob::BlobData ParamTraits<> definition needs this
// definition, so keep this in the implementation file so we can forward declare
// BlobData in the header.

Powered by Google App Engine
This is Rietveld 408576698