chore: rename atom -> electron (#21986)
This commit is contained in:
parent
f14fc4b041
commit
d9321f4df7
287 changed files with 1771 additions and 1708 deletions
|
@ -121,10 +121,10 @@ ui::MouseWheelEvent UiMouseWheelEventFromWebMouseEvent(
|
|||
|
||||
} // namespace
|
||||
|
||||
class AtomBeginFrameTimer : public viz::DelayBasedTimeSourceClient {
|
||||
class ElectronBeginFrameTimer : public viz::DelayBasedTimeSourceClient {
|
||||
public:
|
||||
AtomBeginFrameTimer(int frame_rate_threshold_us,
|
||||
const base::Closure& callback)
|
||||
ElectronBeginFrameTimer(int frame_rate_threshold_us,
|
||||
const base::Closure& callback)
|
||||
: callback_(callback) {
|
||||
time_source_ = std::make_unique<viz::DelayBasedTimeSource>(
|
||||
base::CreateSingleThreadTaskRunner({content::BrowserThread::UI}).get());
|
||||
|
@ -150,12 +150,13 @@ class AtomBeginFrameTimer : public viz::DelayBasedTimeSourceClient {
|
|||
const base::Closure callback_;
|
||||
std::unique_ptr<viz::DelayBasedTimeSource> time_source_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AtomBeginFrameTimer);
|
||||
DISALLOW_COPY_AND_ASSIGN(ElectronBeginFrameTimer);
|
||||
};
|
||||
|
||||
class AtomDelegatedFrameHostClient : public content::DelegatedFrameHostClient {
|
||||
class ElectronDelegatedFrameHostClient
|
||||
: public content::DelegatedFrameHostClient {
|
||||
public:
|
||||
explicit AtomDelegatedFrameHostClient(OffScreenRenderWidgetHostView* view)
|
||||
explicit ElectronDelegatedFrameHostClient(OffScreenRenderWidgetHostView* view)
|
||||
: view_(view) {}
|
||||
|
||||
ui::Layer* DelegatedFrameHostGetLayer() const override {
|
||||
|
@ -194,7 +195,7 @@ class AtomDelegatedFrameHostClient : public content::DelegatedFrameHostClient {
|
|||
private:
|
||||
OffScreenRenderWidgetHostView* const view_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AtomDelegatedFrameHostClient);
|
||||
DISALLOW_COPY_AND_ASSIGN(ElectronDelegatedFrameHostClient);
|
||||
};
|
||||
|
||||
OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView(
|
||||
|
@ -231,7 +232,7 @@ OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView(
|
|||
compositor_allocator_.GetCurrentLocalSurfaceIdAllocation();
|
||||
|
||||
delegated_frame_host_client_ =
|
||||
std::make_unique<AtomDelegatedFrameHostClient>(this);
|
||||
std::make_unique<ElectronDelegatedFrameHostClient>(this);
|
||||
delegated_frame_host_ = std::make_unique<content::DelegatedFrameHost>(
|
||||
AllocateFrameSinkId(is_guest_view_hack),
|
||||
delegated_frame_host_client_.get(),
|
||||
|
@ -1055,7 +1056,7 @@ void OffScreenRenderWidgetHostView::SetupFrameRate(bool force) {
|
|||
if (begin_frame_timer_.get()) {
|
||||
begin_frame_timer_->SetFrameRateThresholdUs(frame_rate_threshold_us_);
|
||||
} else {
|
||||
begin_frame_timer_ = std::make_unique<AtomBeginFrameTimer>(
|
||||
begin_frame_timer_ = std::make_unique<ElectronBeginFrameTimer>(
|
||||
frame_rate_threshold_us_,
|
||||
base::BindRepeating(
|
||||
&OffScreenRenderWidgetHostView::OnBeginFrameTimerTick,
|
||||
|
|
|
@ -50,10 +50,10 @@ class CursorManager;
|
|||
|
||||
namespace electron {
|
||||
|
||||
class AtomCopyFrameGenerator;
|
||||
class AtomBeginFrameTimer;
|
||||
class ElectronCopyFrameGenerator;
|
||||
class ElectronBeginFrameTimer;
|
||||
|
||||
class AtomDelegatedFrameHostClient;
|
||||
class ElectronDelegatedFrameHostClient;
|
||||
|
||||
typedef base::Callback<void(const gfx::Rect&, const SkBitmap&)> OnPaintCallback;
|
||||
typedef base::Callback<void(const gfx::Rect&)> OnPopupPaintCallback;
|
||||
|
@ -279,7 +279,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
|
|||
|
||||
std::unique_ptr<content::CursorManager> cursor_manager_;
|
||||
|
||||
std::unique_ptr<AtomBeginFrameTimer> begin_frame_timer_;
|
||||
std::unique_ptr<ElectronBeginFrameTimer> begin_frame_timer_;
|
||||
OffScreenHostDisplayClient* host_display_client_;
|
||||
std::unique_ptr<OffScreenVideoConsumer> video_consumer_;
|
||||
|
||||
|
@ -287,7 +287,8 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
|
|||
viz::StubBeginFrameSource begin_frame_source_;
|
||||
uint64_t begin_frame_number_ = viz::BeginFrameArgs::kStartingFrameNumber;
|
||||
|
||||
std::unique_ptr<AtomDelegatedFrameHostClient> delegated_frame_host_client_;
|
||||
std::unique_ptr<ElectronDelegatedFrameHostClient>
|
||||
delegated_frame_host_client_;
|
||||
|
||||
content::MouseWheelPhaseHandler mouse_wheel_phase_handler_;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue