
Renderer client id is propagated via command line flags, so in single process mode RenderThreadImpl gets initialized with the default client id of 1, whereas the browser allocates a globally unique client id for each renderer. Viz frame sinks are embedded in a hierarchy which identifies embedders by their client ids. So requests made by the renderer to embed other surfaces are rejected by EmbeddedFrameSinkProviderImpl because the client ids don't match. This CL fixes that by propagating the client id from the browser to RenderThreadImpl in single process mode, and includes related minor code cleanup. Bug: 1015988 Change-Id: I758f19df05ad6dc083e01e8cfc760f76ca1831a2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869376 Reviewed-by: Ken Buchanan <kenrb@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org> Cr-Commit-Position: refs/heads/master@{#708319}
46 lines
1.3 KiB
C++
46 lines
1.3 KiB
C++
// Copyright 2013 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_
|
|
#define CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
#include "base/macros.h"
|
|
#include "base/threading/thread.h"
|
|
#include "content/common/content_export.h"
|
|
#include "content/common/in_process_child_thread_params.h"
|
|
|
|
namespace content {
|
|
class RenderProcess;
|
|
|
|
// This class creates the IO thread for the renderer when running in
|
|
// single-process mode. It's not used in multi-process mode.
|
|
class InProcessRendererThread : public base::Thread {
|
|
public:
|
|
InProcessRendererThread(const InProcessChildThreadParams& params,
|
|
int32_t renderer_client_id);
|
|
~InProcessRendererThread() override;
|
|
|
|
protected:
|
|
void Init() override;
|
|
void CleanUp() override;
|
|
|
|
private:
|
|
const InProcessChildThreadParams params_;
|
|
const int32_t renderer_client_id_;
|
|
std::unique_ptr<RenderProcess> render_process_;
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(InProcessRendererThread);
|
|
};
|
|
|
|
CONTENT_EXPORT base::Thread* CreateInProcessRendererThread(
|
|
const InProcessChildThreadParams& params,
|
|
int32_t renderer_client_id);
|
|
|
|
} // namespace content
|
|
|
|
#endif // CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_
|