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

Side by Side Diff: mojo/services/native_viewport/native_viewport_controller.cc

Issue 64623003: Fix win64 build failure on size truncation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/public/tests/bindings_connector_unittest.cc ('k') | mojo/system/message_pipe_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "mojo/services/native_viewport/native_viewport_controller.h" 5 #include "mojo/services/native_viewport/native_viewport_controller.h"
6 6
7 #include <limits>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
9 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
10 #include "gpu/command_buffer/client/gl_in_process_context.h" 12 #include "gpu/command_buffer/client/gl_in_process_context.h"
11 #include "gpu/command_buffer/client/gles2_implementation.h" 13 #include "gpu/command_buffer/client/gles2_implementation.h"
12 #include "mojo/services/native_viewport/native_viewport.h" 14 #include "mojo/services/native_viewport/native_viewport.h"
13 #include "ui/events/event.h" 15 #include "ui/events/event.h"
14 16
15 namespace mojo { 17 namespace mojo {
16 namespace services { 18 namespace services {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 SendString(base::StringPrintf("Sized to: %d x %d", 65 SendString(base::StringPrintf("Sized to: %d x %d",
64 size.width(), 66 size.width(),
65 size.height())); 67 size.height()));
66 } 68 }
67 69
68 void NativeViewportController::OnDestroyed() { 70 void NativeViewportController::OnDestroyed() {
69 base::MessageLoop::current()->Quit(); 71 base::MessageLoop::current()->Quit();
70 } 72 }
71 73
72 void NativeViewportController::SendString(const std::string& string) { 74 void NativeViewportController::SendString(const std::string& string) {
73 WriteMessage(pipe_, string.c_str(), string.size()+1, NULL, 0, 75 DCHECK_LT(string.size() + 1, std::numeric_limits<uint32_t>::max());
74 MOJO_WRITE_MESSAGE_FLAG_NONE); 76 WriteMessage(pipe_, string.c_str(), static_cast<uint32_t>(string.size() + 1),
77 NULL, 0, MOJO_WRITE_MESSAGE_FLAG_NONE);
75 } 78 }
76 79
77 } // namespace services 80 } // namespace services
78 } // namespace mojo 81 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/tests/bindings_connector_unittest.cc ('k') | mojo/system/message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698