OLD | NEW |
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 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_THREAD_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_THREAD_H_ |
6 #define CONTENT_PUBLIC_RENDERER_RENDER_THREAD_H_ | 6 #define CONTENT_PUBLIC_RENDERER_RENDER_THREAD_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // RenderThread::Get()->RecordAction( | 90 // RenderThread::Get()->RecordAction( |
91 // base::UserMetricsAction("my extremely long action name")); | 91 // base::UserMetricsAction("my extremely long action name")); |
92 // because otherwise our processing scripts won't pick up on new actions. | 92 // because otherwise our processing scripts won't pick up on new actions. |
93 virtual void RecordAction(const base::UserMetricsAction& action) = 0; | 93 virtual void RecordAction(const base::UserMetricsAction& action) = 0; |
94 | 94 |
95 // Sends over a string to be recorded by user metrics as a computed action. | 95 // Sends over a string to be recorded by user metrics as a computed action. |
96 // When you use this you need to also update the rules for extracting known | 96 // When you use this you need to also update the rules for extracting known |
97 // actions in chrome/tools/extract_actions.py. | 97 // actions in chrome/tools/extract_actions.py. |
98 virtual void RecordComputedAction(const std::string& action) = 0; | 98 virtual void RecordComputedAction(const std::string& action) = 0; |
99 | 99 |
| 100 // Sends over a metric and sample string to be recorded by RAPPOR. |
| 101 virtual void RecordRappor( |
| 102 const std::string& metric, |
| 103 const std::string& sample) = 0; |
| 104 |
100 // Asks the host to create a block of shared memory for the renderer. | 105 // Asks the host to create a block of shared memory for the renderer. |
101 // The shared memory allocated by the host is returned back. | 106 // The shared memory allocated by the host is returned back. |
102 virtual scoped_ptr<base::SharedMemory> HostAllocateSharedMemoryBuffer( | 107 virtual scoped_ptr<base::SharedMemory> HostAllocateSharedMemoryBuffer( |
103 size_t buffer_size) = 0; | 108 size_t buffer_size) = 0; |
104 | 109 |
105 virtual cc::SharedBitmapManager* GetSharedBitmapManager() = 0; | 110 virtual cc::SharedBitmapManager* GetSharedBitmapManager() = 0; |
106 | 111 |
107 // Registers the given V8 extension with WebKit. | 112 // Registers the given V8 extension with WebKit. |
108 virtual void RegisterExtension(v8::Extension* extension) = 0; | 113 virtual void RegisterExtension(v8::Extension* extension) = 0; |
109 | 114 |
(...skipping 21 matching lines...) Expand all Loading... |
131 // Gets the shutdown event for the process. | 136 // Gets the shutdown event for the process. |
132 virtual base::WaitableEvent* GetShutdownEvent() = 0; | 137 virtual base::WaitableEvent* GetShutdownEvent() = 0; |
133 | 138 |
134 // Returns the ServiceRegistry for this thread. | 139 // Returns the ServiceRegistry for this thread. |
135 virtual ServiceRegistry* GetServiceRegistry() = 0; | 140 virtual ServiceRegistry* GetServiceRegistry() = 0; |
136 }; | 141 }; |
137 | 142 |
138 } // namespace content | 143 } // namespace content |
139 | 144 |
140 #endif // CONTENT_PUBLIC_RENDERER_RENDER_THREAD_H_ | 145 #endif // CONTENT_PUBLIC_RENDERER_RENDER_THREAD_H_ |
OLD | NEW |