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

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: Fix Clang 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
« no previous file with comments | « content/common/common_param_traits.h ('k') | content/common/font_descriptor_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/common_param_traits.cc
diff --git a/content/common/common_param_traits.cc b/content/common/common_param_traits.cc
index 1e0ffd04e3d7eb26d59911878f63de0e7cf7530c..5e310036c4681abc26004ea0ce2b17b105b39896 100644
--- a/content/common/common_param_traits.cc
+++ b/content/common/common_param_traits.cc
@@ -9,6 +9,7 @@
#include "net/base/upload_data.h"
#include "net/http/http_response_headers.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/base/range/range.h"
#include "ui/gfx/rect.h"
namespace {
@@ -501,6 +502,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()));
+}
+
void ParamTraits<SkBitmap>::Write(Message* m, const SkBitmap& p) {
size_t fixed_size = sizeof(SkBitmap_Data);
SkBitmap_Data bmp_data;
« no previous file with comments | « content/common/common_param_traits.h ('k') | content/common/font_descriptor_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698