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

Unified Diff: content/gpu/gpu_child_thread.h

Issue 2034933002: Make field trials activated in the GPU process be reflected in browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a unit test for child_process_field_trial_syncer.cc Created 4 years, 6 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/gpu/gpu_child_thread.h
diff --git a/content/gpu/gpu_child_thread.h b/content/gpu/gpu_child_thread.h
index 304798230a7f801a850b8befaeb8c472ad77bb44..2374ca6aeeffbf593b5513790db9d248ca0e0d22 100644
--- a/content/gpu/gpu_child_thread.h
+++ b/content/gpu/gpu_child_thread.h
@@ -14,6 +14,7 @@
#include "base/command_line.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "base/metrics/field_trial.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "content/child/child_thread_impl.h"
@@ -52,7 +53,8 @@ struct EstablishChannelParams;
// IPC messages to gpu::GpuChannelManager, which is responsible for issuing
// rendering commands to the GPU.
class GpuChildThread : public ChildThreadImpl,
- public gpu::GpuChannelManagerDelegate {
+ public gpu::GpuChannelManagerDelegate,
+ public base::FieldTrialList::Observer {
public:
typedef std::queue<IPC::Message*> DeferredMessages;
@@ -80,12 +82,12 @@ class GpuChildThread : public ChildThreadImpl,
gpu::GpuPreferences gpu_preferences() { return gpu_preferences_; }
private:
- // ChildThread overrides.
+ // ChildThreadImpl:.
bool Send(IPC::Message* msg) override;
bool OnControlMessageReceived(const IPC::Message& msg) override;
bool OnMessageReceived(const IPC::Message& msg) override;
- // gpu::GpuChannelManagerDelegate implementation.
+ // gpu::GpuChannelManagerDelegate:
void SetActiveURL(const GURL& url) override;
void DidCreateOffscreenContext(const GURL& active_url) override;
void DidDestroyChannel(int client_id) override;
@@ -103,6 +105,10 @@ class GpuChildThread : public ChildThreadImpl,
const std::string& key,
const std::string& shader) override;
+ // base::FieldTrialList::Observer:
+ void OnFieldTrialGroupFinalized(const std::string& trial_name,
+ const std::string& group_name) override;
+
// Message handlers.
void OnInitialize(const gpu::GpuPreferences& gpu_preferences);
void OnFinalize();

Powered by Google App Engine
This is Rietveld 408576698