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

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « content/browser/webui/web_ui_impl.cc ('k') | content/renderer/stats_collection_controller.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/hash.h" 8 #include "base/hash.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // Prevents idle work from being starved. 111 // Prevents idle work from being starved.
112 const int64 kMaxTimeSinceIdleMs = 10; 112 const int64 kMaxTimeSinceIdleMs = 10;
113 113
114 class DevToolsChannelData : public base::trace_event::ConvertableToTraceFormat { 114 class DevToolsChannelData : public base::trace_event::ConvertableToTraceFormat {
115 public: 115 public:
116 static scoped_refptr<base::trace_event::ConvertableToTraceFormat> 116 static scoped_refptr<base::trace_event::ConvertableToTraceFormat>
117 CreateForChannel(GpuChannel* channel); 117 CreateForChannel(GpuChannel* channel);
118 118
119 void AppendAsTraceFormat(std::string* out) const override { 119 void AppendAsTraceFormat(std::string* out) const override {
120 std::string tmp; 120 std::string tmp;
121 base::JSONWriter::Write(value_.get(), &tmp); 121 base::JSONWriter::Write(*value_, &tmp);
122 *out += tmp; 122 *out += tmp;
123 } 123 }
124 124
125 private: 125 private:
126 explicit DevToolsChannelData(base::Value* value) : value_(value) {} 126 explicit DevToolsChannelData(base::Value* value) : value_(value) {}
127 ~DevToolsChannelData() override {} 127 ~DevToolsChannelData() override {}
128 scoped_ptr<base::Value> value_; 128 scoped_ptr<base::Value> value_;
129 DISALLOW_COPY_AND_ASSIGN(DevToolsChannelData); 129 DISALLOW_COPY_AND_ASSIGN(DevToolsChannelData);
130 }; 130 };
131 131
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 Send(new GpuCommandBufferMsg_SwapBuffersCompleted(route_id_, latency_info)); 1111 Send(new GpuCommandBufferMsg_SwapBuffersCompleted(route_id_, latency_info));
1112 } 1112 }
1113 1113
1114 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, 1114 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase,
1115 base::TimeDelta interval) { 1115 base::TimeDelta interval) {
1116 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, 1116 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase,
1117 interval)); 1117 interval));
1118 } 1118 }
1119 1119
1120 } // namespace content 1120 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/webui/web_ui_impl.cc ('k') | content/renderer/stats_collection_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698