cleaning up osr pt1
This commit is contained in:
parent
fdff60132c
commit
6abf7475b8
13 changed files with 196 additions and 239 deletions
|
@ -70,9 +70,7 @@
|
||||||
|
|
||||||
#include "content/browser/web_contents/web_contents_impl.h"
|
#include "content/browser/web_contents/web_contents_impl.h"
|
||||||
#include "atom/browser/osr_web_contents_view.h"
|
#include "atom/browser/osr_web_contents_view.h"
|
||||||
|
#include "atom/browser/osr_render_widget_host_view.h"
|
||||||
#include "content/browser/web_contents/web_contents_impl.h"
|
|
||||||
#include "atom/browser/osr_web_contents_view.h"
|
|
||||||
|
|
||||||
#include "atom/common/node_includes.h"
|
#include "atom/common/node_includes.h"
|
||||||
|
|
||||||
|
@ -316,16 +314,19 @@ WebContents::WebContents(v8::Isolate* isolate,
|
||||||
params.guest_delegate = guest_delegate_.get();
|
params.guest_delegate = guest_delegate_.get();
|
||||||
web_contents = content::WebContents::Create(params);
|
web_contents = content::WebContents::Create(params);
|
||||||
} else if(IsOffScreen()) {
|
} else if(IsOffScreen()) {
|
||||||
content::WebContents::CreateParams params(session->browser_context());
|
content::WebContents::CreateParams params(session->browser_context());
|
||||||
|
|
||||||
auto view = new OffScreenWebContentsView();
|
auto view = new OffScreenWebContentsView();
|
||||||
params.view = view;
|
params.view = view;
|
||||||
params.delegate_view = view;
|
params.delegate_view = view;
|
||||||
|
|
||||||
web_contents = content::WebContents::Create(params);
|
web_contents = content::WebContents::Create(params);
|
||||||
view->SetWebContents(web_contents);
|
view->SetWebContents(web_contents);
|
||||||
} else {
|
|
||||||
content::WebContents::CreateParams params(session->browser_context());
|
paint_callback_ = base::Bind(&WebContents::OnPaint, base::Unretained(this),
|
||||||
|
isolate);
|
||||||
|
} else {
|
||||||
|
content::WebContents::CreateParams params(session->browser_context());
|
||||||
web_contents = content::WebContents::Create(params);
|
web_contents = content::WebContents::Create(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -401,6 +402,14 @@ void WebContents::OnCreateWindow(const GURL& target_url,
|
||||||
Emit("new-window", target_url, frame_name, disposition);
|
Emit("new-window", target_url, frame_name, disposition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WebContents::RenderViewReady() {
|
||||||
|
if (IsOffScreen()) {
|
||||||
|
const auto rwhv = web_contents()->GetRenderWidgetHostView();
|
||||||
|
auto osr_rwhv = static_cast<OffScreenRenderWidgetHostView *>(rwhv);
|
||||||
|
osr_rwhv->SetPaintCallback(&paint_callback_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
content::WebContents* WebContents::OpenURLFromTab(
|
content::WebContents* WebContents::OpenURLFromTab(
|
||||||
content::WebContents* source,
|
content::WebContents* source,
|
||||||
const content::OpenURLParams& params) {
|
const content::OpenURLParams& params) {
|
||||||
|
@ -1226,30 +1235,12 @@ void WebContents::BeginFrameSubscription(mate::Arguments* args) {
|
||||||
|
|
||||||
const auto view = web_contents()->GetRenderWidgetHostView();
|
const auto view = web_contents()->GetRenderWidgetHostView();
|
||||||
if (view) {
|
if (view) {
|
||||||
// std::unique_ptr<FrameSubscriber> frame_subscriber(new FrameSubscriber(
|
std::unique_ptr<FrameSubscriber> frame_subscriber(new FrameSubscriber(
|
||||||
// isolate(), view, callback, only_dirty));
|
isolate(), view, callback, only_dirty));
|
||||||
// view->BeginFrameSubscription(std::move(frame_subscriber));
|
view->BeginFrameSubscription(std::move(frame_subscriber));
|
||||||
paint_isolate_ = args->isolate();
|
|
||||||
|
|
||||||
auto v = static_cast<OffScreenWindow *>(view);
|
|
||||||
paint_callback_ = base::Bind(&WebContents::OnPaint,
|
|
||||||
base::Unretained(this));
|
|
||||||
v->SetPaintCallback(&paint_callback_);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebContents::OnPaint(
|
|
||||||
const gfx::Rect& damage_rect,
|
|
||||||
int bitmap_width,
|
|
||||||
int bitmap_height,
|
|
||||||
void* bitmap_pixels) {
|
|
||||||
|
|
||||||
v8::MaybeLocal<v8::Object> buffer = node::Buffer::New(paint_isolate_
|
|
||||||
, (char *)bitmap_pixels, sizeof(bitmap_pixels));
|
|
||||||
|
|
||||||
Emit("paint", damage_rect, bitmap_width, bitmap_height, buffer.ToLocalChecked());
|
|
||||||
}
|
|
||||||
|
|
||||||
void WebContents::EndFrameSubscription() {
|
void WebContents::EndFrameSubscription() {
|
||||||
const auto view = web_contents()->GetRenderWidgetHostView();
|
const auto view = web_contents()->GetRenderWidgetHostView();
|
||||||
if (view)
|
if (view)
|
||||||
|
@ -1396,6 +1387,19 @@ v8::Local<v8::Value> WebContents::Debugger(v8::Isolate* isolate) {
|
||||||
return v8::Local<v8::Value>::New(isolate, debugger_);
|
return v8::Local<v8::Value>::New(isolate, debugger_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WebContents::OnPaint(
|
||||||
|
v8::Isolate* isolate,
|
||||||
|
const gfx::Rect& damage_rect,
|
||||||
|
int bitmap_width,
|
||||||
|
int bitmap_height,
|
||||||
|
void* bitmap_pixels) {
|
||||||
|
v8::MaybeLocal<v8::Object> buffer = node::Buffer::New(isolate
|
||||||
|
, (char *)bitmap_pixels, sizeof(bitmap_pixels));
|
||||||
|
|
||||||
|
Emit("paint", damage_rect, bitmap_width, bitmap_height,
|
||||||
|
buffer.ToLocalChecked());
|
||||||
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void WebContents::BuildPrototype(v8::Isolate* isolate,
|
void WebContents::BuildPrototype(v8::Isolate* isolate,
|
||||||
v8::Local<v8::ObjectTemplate> prototype) {
|
v8::Local<v8::ObjectTemplate> prototype) {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "native_mate/handle.h"
|
#include "native_mate/handle.h"
|
||||||
#include "ui/gfx/image/image.h"
|
#include "ui/gfx/image/image.h"
|
||||||
|
|
||||||
#include "atom/browser/osr_window.h"
|
#include "atom/browser/osr_output_device.h"
|
||||||
|
|
||||||
namespace blink {
|
namespace blink {
|
||||||
struct WebDeviceEmulationParams;
|
struct WebDeviceEmulationParams;
|
||||||
|
@ -145,7 +145,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
|
||||||
// Subscribe to the frame updates.
|
// Subscribe to the frame updates.
|
||||||
void BeginFrameSubscription(mate::Arguments* args);
|
void BeginFrameSubscription(mate::Arguments* args);
|
||||||
void EndFrameSubscription();
|
void EndFrameSubscription();
|
||||||
void OnPaint(const gfx::Rect&, int, int, void*);
|
void OnPaint(v8::Isolate*, const gfx::Rect&, int, int, void*);
|
||||||
|
|
||||||
// Dragging native items.
|
// Dragging native items.
|
||||||
void StartDrag(const mate::Dictionary& item, mate::Arguments* args);
|
void StartDrag(const mate::Dictionary& item, mate::Arguments* args);
|
||||||
|
@ -272,6 +272,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
|
||||||
void MediaStartedPlaying(const MediaPlayerId& id) override;
|
void MediaStartedPlaying(const MediaPlayerId& id) override;
|
||||||
void MediaStoppedPlaying(const MediaPlayerId& id) override;
|
void MediaStoppedPlaying(const MediaPlayerId& id) override;
|
||||||
void DidChangeThemeColor(SkColor theme_color) override;
|
void DidChangeThemeColor(SkColor theme_color) override;
|
||||||
|
void RenderViewReady() override;
|
||||||
|
|
||||||
// brightray::InspectableWebContentsDelegate:
|
// brightray::InspectableWebContentsDelegate:
|
||||||
void DevToolsReloadPage() override;
|
void DevToolsReloadPage() override;
|
||||||
|
@ -309,8 +310,6 @@ class WebContents : public mate::TrackableObject<WebContents>,
|
||||||
v8::Global<v8::Value> devtools_web_contents_;
|
v8::Global<v8::Value> devtools_web_contents_;
|
||||||
v8::Global<v8::Value> debugger_;
|
v8::Global<v8::Value> debugger_;
|
||||||
|
|
||||||
v8::Isolate* paint_isolate_;
|
|
||||||
|
|
||||||
std::unique_ptr<WebViewGuestDelegate> guest_delegate_;
|
std::unique_ptr<WebViewGuestDelegate> guest_delegate_;
|
||||||
|
|
||||||
// The host webcontents that may contain this webcontents.
|
// The host webcontents that may contain this webcontents.
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
|
|
||||||
#include "atom/browser/api/atom_api_web_contents.h"
|
#include "atom/browser/api/atom_api_web_contents.h"
|
||||||
|
|
||||||
// @interface NSWindow
|
@interface NSWindow
|
||||||
// - (BOOL)isKeyWindow;
|
- (BOOL)isKeyWindow;
|
||||||
// @end
|
@end
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,6 @@
|
||||||
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
|
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include "atom/browser/osr_window.h"
|
|
||||||
#include "content/public/browser/render_widget_host.h"
|
#include "content/public/browser/render_widget_host.h"
|
||||||
#include "content/public/browser/render_view_host.h"
|
#include "content/public/browser/render_view_host.h"
|
||||||
#include "content/public/browser/context_factory.h"
|
#include "content/public/browser/context_factory.h"
|
||||||
|
|
|
@ -17,8 +17,6 @@ typedef base::Callback<void(const gfx::Rect&,int,int,void*)> OnPaintCallback;
|
||||||
|
|
||||||
class OffScreenOutputDevice : public cc::SoftwareOutputDevice {
|
class OffScreenOutputDevice : public cc::SoftwareOutputDevice {
|
||||||
public:
|
public:
|
||||||
typedef base::Callback<void(const gfx::Rect&,int,int,void*)>
|
|
||||||
OnPaintCallback;
|
|
||||||
|
|
||||||
OffScreenOutputDevice(bool transparent, const OnPaintCallback& callback);
|
OffScreenOutputDevice(bool transparent, const OnPaintCallback& callback);
|
||||||
~OffScreenOutputDevice();
|
~OffScreenOutputDevice();
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
// Use of this source code is governed by the MIT license that can be
|
// Use of this source code is governed by the MIT license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
#include "atom/browser/osr_window.h"
|
#include "atom/browser/osr_render_widget_host_view.h"
|
||||||
|
|
||||||
#include "third_party/WebKit/public/platform/WebScreenInfo.h"
|
#include "third_party/WebKit/public/platform/WebScreenInfo.h"
|
||||||
#include "components/display_compositor/gl_helper.h"
|
#include "components/display_compositor/gl_helper.h"
|
||||||
#include "content/browser/renderer_host/render_widget_host_impl.h"
|
#include "content/browser/renderer_host/render_widget_host_impl.h"
|
||||||
|
@ -35,9 +36,7 @@
|
||||||
#include "content/public/browser/browser_thread.h"
|
#include "content/public/browser/browser_thread.h"
|
||||||
#include "cc/scheduler/delay_based_time_source.h"
|
#include "cc/scheduler/delay_based_time_source.h"
|
||||||
|
|
||||||
#include "content/common/host_shared_bitmap_manager.h"
|
const float kDefaultScaleFactor = 1.0;
|
||||||
|
|
||||||
// const float kDefaultScaleFactor = 1.0;
|
|
||||||
|
|
||||||
// The maximum number of retry counts if frame capture fails.
|
// The maximum number of retry counts if frame capture fails.
|
||||||
const int kFrameRetryLimit = 2;
|
const int kFrameRetryLimit = 2;
|
||||||
|
@ -60,7 +59,7 @@ namespace atom {
|
||||||
class AtomCopyFrameGenerator {
|
class AtomCopyFrameGenerator {
|
||||||
public:
|
public:
|
||||||
AtomCopyFrameGenerator(int frame_rate_threshold_ms,
|
AtomCopyFrameGenerator(int frame_rate_threshold_ms,
|
||||||
OffScreenWindow* view)
|
OffScreenRenderWidgetHostView* view)
|
||||||
: frame_rate_threshold_ms_(frame_rate_threshold_ms),
|
: frame_rate_threshold_ms_(frame_rate_threshold_ms),
|
||||||
view_(view),
|
view_(view),
|
||||||
frame_pending_(false),
|
frame_pending_(false),
|
||||||
|
@ -321,7 +320,7 @@ class AtomCopyFrameGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
int frame_rate_threshold_ms_;
|
int frame_rate_threshold_ms_;
|
||||||
OffScreenWindow* view_;
|
OffScreenRenderWidgetHostView* view_;
|
||||||
|
|
||||||
base::Time last_time_;
|
base::Time last_time_;
|
||||||
|
|
||||||
|
@ -376,15 +375,14 @@ class AtomBeginFrameTimer : public cc::DelayBasedTimeSourceClient {
|
||||||
DISALLOW_COPY_AND_ASSIGN(AtomBeginFrameTimer);
|
DISALLOW_COPY_AND_ASSIGN(AtomBeginFrameTimer);
|
||||||
};
|
};
|
||||||
|
|
||||||
OffScreenWindow::OffScreenWindow(
|
OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView(
|
||||||
content::RenderWidgetHost* host, NativeWindow* native_window)
|
content::RenderWidgetHost* host, NativeWindow* native_window): render_widget_host_(content::RenderWidgetHostImpl::From(host)),
|
||||||
: render_widget_host_(content::RenderWidgetHostImpl::From(host)),
|
|
||||||
native_window_(native_window),
|
native_window_(native_window),
|
||||||
software_output_device_(NULL),
|
software_output_device_(NULL),
|
||||||
frame_rate_threshold_ms_(0),
|
frame_rate_threshold_ms_(0),
|
||||||
scale_factor_(1.0f),
|
scale_factor_(kDefaultScaleFactor),
|
||||||
is_showing_(!render_widget_host_->is_hidden()),
|
is_showing_(!render_widget_host_->is_hidden()),
|
||||||
size_(gfx::Size(800, 600)),
|
size_(native_window->GetSize()),
|
||||||
delegated_frame_host_(new content::DelegatedFrameHost(this)),
|
delegated_frame_host_(new content::DelegatedFrameHost(this)),
|
||||||
compositor_widget_(gfx::kNullAcceleratedWidget),
|
compositor_widget_(gfx::kNullAcceleratedWidget),
|
||||||
weak_ptr_factory_(this) {
|
weak_ptr_factory_(this) {
|
||||||
|
@ -413,7 +411,7 @@ OffScreenWindow::OffScreenWindow(
|
||||||
ResizeRootLayer();
|
ResizeRootLayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::ResizeRootLayer() {
|
void OffScreenRenderWidgetHostView::ResizeRootLayer() {
|
||||||
SetFrameRate();
|
SetFrameRate();
|
||||||
|
|
||||||
// const float orgScaleFactor = scale_factor_;
|
// const float orgScaleFactor = scale_factor_;
|
||||||
|
@ -436,14 +434,14 @@ void OffScreenWindow::ResizeRootLayer() {
|
||||||
// compositor_->SetScaleAndSize(scale_factor_, size_in_pixels);
|
// compositor_->SetScaleAndSize(scale_factor_, size_in_pixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::OnBeginFrameTimerTick() {
|
void OffScreenRenderWidgetHostView::OnBeginFrameTimerTick() {
|
||||||
const base::TimeTicks frame_time = base::TimeTicks::Now();
|
const base::TimeTicks frame_time = base::TimeTicks::Now();
|
||||||
const base::TimeDelta vsync_period =
|
const base::TimeDelta vsync_period =
|
||||||
base::TimeDelta::FromMilliseconds(frame_rate_threshold_ms_);
|
base::TimeDelta::FromMilliseconds(frame_rate_threshold_ms_);
|
||||||
SendBeginFrame(frame_time, vsync_period);
|
SendBeginFrame(frame_time, vsync_period);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::SendBeginFrame(base::TimeTicks frame_time,
|
void OffScreenRenderWidgetHostView::SendBeginFrame(base::TimeTicks frame_time,
|
||||||
base::TimeDelta vsync_period) {
|
base::TimeDelta vsync_period) {
|
||||||
base::TimeTicks display_time = frame_time + vsync_period;
|
base::TimeTicks display_time = frame_time + vsync_period;
|
||||||
|
|
||||||
|
@ -458,15 +456,14 @@ void OffScreenWindow::SendBeginFrame(base::TimeTicks frame_time,
|
||||||
render_widget_host_->GetRoutingID(),
|
render_widget_host_->GetRoutingID(),
|
||||||
cc::BeginFrameArgs::Create(BEGINFRAME_FROM_HERE, frame_time, deadline,
|
cc::BeginFrameArgs::Create(BEGINFRAME_FROM_HERE, frame_time, deadline,
|
||||||
vsync_period, cc::BeginFrameArgs::NORMAL)));
|
vsync_period, cc::BeginFrameArgs::NORMAL)));
|
||||||
// std::cout << "sent begin frame" << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::SetPaintCallback(const OnPaintCallback* callback) {
|
void OffScreenRenderWidgetHostView::SetPaintCallback(const OnPaintCallback* callback) {
|
||||||
paintCallback.reset(callback);
|
callback_.reset(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
OffScreenWindow::~OffScreenWindow() {
|
OffScreenRenderWidgetHostView::~OffScreenRenderWidgetHostView() {
|
||||||
// std::cout << "~OffScreenWindow" << std::endl;
|
// std::cout << "~OffScreenRenderWidgetHostView" << std::endl;
|
||||||
|
|
||||||
if (is_showing_)
|
if (is_showing_)
|
||||||
delegated_frame_host_->WasHidden();
|
delegated_frame_host_->WasHidden();
|
||||||
|
@ -477,11 +474,11 @@ OffScreenWindow::~OffScreenWindow() {
|
||||||
root_layer_.reset(NULL);
|
root_layer_.reset(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OffScreenWindow::OnMessageReceived(const IPC::Message& message) {
|
bool OffScreenRenderWidgetHostView::OnMessageReceived(const IPC::Message& message) {
|
||||||
// std::cout << "OnMessageReceived" << std::endl;
|
// std::cout << "OnMessageReceived" << std::endl;
|
||||||
|
|
||||||
bool handled = true;
|
bool handled = true;
|
||||||
IPC_BEGIN_MESSAGE_MAP(OffScreenWindow, message)
|
IPC_BEGIN_MESSAGE_MAP(OffScreenRenderWidgetHostView, message)
|
||||||
IPC_MESSAGE_HANDLER(ViewHostMsg_SetNeedsBeginFrames,
|
IPC_MESSAGE_HANDLER(ViewHostMsg_SetNeedsBeginFrames,
|
||||||
OnSetNeedsBeginFrames)
|
OnSetNeedsBeginFrames)
|
||||||
IPC_MESSAGE_UNHANDLED(handled = false)
|
IPC_MESSAGE_UNHANDLED(handled = false)
|
||||||
|
@ -492,16 +489,16 @@ bool OffScreenWindow::OnMessageReceived(const IPC::Message& message) {
|
||||||
return handled;
|
return handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::InitAsChild(gfx::NativeView) {
|
void OffScreenRenderWidgetHostView::InitAsChild(gfx::NativeView) {
|
||||||
// std::cout << "InitAsChild" << std::endl;
|
// std::cout << "InitAsChild" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
content::RenderWidgetHost* OffScreenWindow::GetRenderWidgetHost() const {
|
content::RenderWidgetHost* OffScreenRenderWidgetHostView::GetRenderWidgetHost() const {
|
||||||
// std::cout << "GetRenderWidgetHost" << std::endl;
|
// std::cout << "GetRenderWidgetHost" << std::endl;
|
||||||
return render_widget_host_;
|
return render_widget_host_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::SetSize(const gfx::Size& size) {
|
void OffScreenRenderWidgetHostView::SetSize(const gfx::Size& size) {
|
||||||
// std::cout << "SetSize" << std::endl;
|
// std::cout << "SetSize" << std::endl;
|
||||||
size_ = size;
|
size_ = size;
|
||||||
|
|
||||||
|
@ -514,45 +511,45 @@ void OffScreenWindow::SetSize(const gfx::Size& size) {
|
||||||
compositor_->SetScaleAndSize(scale_factor_, size_in_pixels);
|
compositor_->SetScaleAndSize(scale_factor_, size_in_pixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::SetBounds(const gfx::Rect& new_bounds) {
|
void OffScreenRenderWidgetHostView::SetBounds(const gfx::Rect& new_bounds) {
|
||||||
// std::cout << "SetBounds" << std::endl;
|
// std::cout << "SetBounds" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Vector2dF OffScreenWindow::GetLastScrollOffset() const {
|
gfx::Vector2dF OffScreenRenderWidgetHostView::GetLastScrollOffset() const {
|
||||||
// std::cout << "GetLastScrollOffset" << std::endl;
|
// std::cout << "GetLastScrollOffset" << std::endl;
|
||||||
return last_scroll_offset_;
|
return last_scroll_offset_;
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::NativeView OffScreenWindow::GetNativeView() const {
|
gfx::NativeView OffScreenRenderWidgetHostView::GetNativeView() const {
|
||||||
// std::cout << "GetNativeView" << std::endl;
|
// std::cout << "GetNativeView" << std::endl;
|
||||||
return gfx::NativeView();
|
return gfx::NativeView();
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::NativeViewAccessible OffScreenWindow::GetNativeViewAccessible() {
|
gfx::NativeViewAccessible OffScreenRenderWidgetHostView::GetNativeViewAccessible() {
|
||||||
// std::cout << "GetNativeViewAccessible" << std::endl;
|
// std::cout << "GetNativeViewAccessible" << std::endl;
|
||||||
return gfx::NativeViewAccessible();
|
return gfx::NativeViewAccessible();
|
||||||
}
|
}
|
||||||
|
|
||||||
ui::TextInputClient* OffScreenWindow::GetTextInputClient() {
|
ui::TextInputClient* OffScreenRenderWidgetHostView::GetTextInputClient() {
|
||||||
// std::cout << "GetTextInputClient" << std::endl;
|
// std::cout << "GetTextInputClient" << std::endl;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::Focus() {
|
void OffScreenRenderWidgetHostView::Focus() {
|
||||||
// std::cout << "Focus" << std::endl;
|
// std::cout << "Focus" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OffScreenWindow::HasFocus() const {
|
bool OffScreenRenderWidgetHostView::HasFocus() const {
|
||||||
// std::cout << "HasFocus" << std::endl;
|
// std::cout << "HasFocus" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OffScreenWindow::IsSurfaceAvailableForCopy() const {
|
bool OffScreenRenderWidgetHostView::IsSurfaceAvailableForCopy() const {
|
||||||
// std::cout << "IsSurfaceAvailableForCopy" << std::endl;
|
// std::cout << "IsSurfaceAvailableForCopy" << std::endl;
|
||||||
return delegated_frame_host_->CanCopyToBitmap();
|
return delegated_frame_host_->CanCopyToBitmap();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::Show() {
|
void OffScreenRenderWidgetHostView::Show() {
|
||||||
// std::cout << "Show" << std::endl;
|
// std::cout << "Show" << std::endl;
|
||||||
if (is_showing_)
|
if (is_showing_)
|
||||||
return;
|
return;
|
||||||
|
@ -564,7 +561,7 @@ void OffScreenWindow::Show() {
|
||||||
delegated_frame_host_->WasShown(ui::LatencyInfo());
|
delegated_frame_host_->WasShown(ui::LatencyInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::Hide() {
|
void OffScreenRenderWidgetHostView::Hide() {
|
||||||
// std::cout << "Hide" << std::endl;
|
// std::cout << "Hide" << std::endl;
|
||||||
if (!is_showing_)
|
if (!is_showing_)
|
||||||
return;
|
return;
|
||||||
|
@ -576,48 +573,48 @@ void OffScreenWindow::Hide() {
|
||||||
is_showing_ = false;
|
is_showing_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OffScreenWindow::IsShowing() {
|
bool OffScreenRenderWidgetHostView::IsShowing() {
|
||||||
// std::cout << "IsShowing" << std::endl;
|
// std::cout << "IsShowing" << std::endl;
|
||||||
return is_showing_;
|
return is_showing_;
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Rect OffScreenWindow::GetViewBounds() const {
|
gfx::Rect OffScreenRenderWidgetHostView::GetViewBounds() const {
|
||||||
// std::cout << "GetViewBounds" << std::endl;
|
// std::cout << "GetViewBounds" << std::endl;
|
||||||
// std::cout << size_.width() << "x" << size_.height() << std::endl;
|
// std::cout << size_.width() << "x" << size_.height() << std::endl;
|
||||||
return gfx::Rect(size_);
|
return gfx::Rect(size_);
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Size OffScreenWindow::GetVisibleViewportSize() const {
|
gfx::Size OffScreenRenderWidgetHostView::GetVisibleViewportSize() const {
|
||||||
// std::cout << "GetVisibleViewportSize" << std::endl;
|
// std::cout << "GetVisibleViewportSize" << std::endl;
|
||||||
// std::cout << size_.width() << "x" << size_.height() << std::endl;
|
// std::cout << size_.width() << "x" << size_.height() << std::endl;
|
||||||
return size_;
|
return size_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::SetInsets(const gfx::Insets& insets) {
|
void OffScreenRenderWidgetHostView::SetInsets(const gfx::Insets& insets) {
|
||||||
// std::cout << "SetInsets" << std::endl;
|
// std::cout << "SetInsets" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OffScreenWindow::LockMouse() {
|
bool OffScreenRenderWidgetHostView::LockMouse() {
|
||||||
// std::cout << "LockMouse" << std::endl;
|
// std::cout << "LockMouse" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::UnlockMouse() {
|
void OffScreenRenderWidgetHostView::UnlockMouse() {
|
||||||
// std::cout << "UnlockMouse" << std::endl;
|
// std::cout << "UnlockMouse" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OffScreenWindow::GetScreenColorProfile(std::vector<char>*) {
|
bool OffScreenRenderWidgetHostView::GetScreenColorProfile(std::vector<char>*) {
|
||||||
// std::cout << "GetScreenColorProfile" << std::endl;
|
// std::cout << "GetScreenColorProfile" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::OnSwapCompositorFrame(
|
void OffScreenRenderWidgetHostView::OnSwapCompositorFrame(
|
||||||
uint32_t output_surface_id,
|
uint32_t output_surface_id,
|
||||||
std::unique_ptr<cc::CompositorFrame> frame) {
|
std::unique_ptr<cc::CompositorFrame> frame) {
|
||||||
// base::Time now = base::Time::Now();
|
// base::Time now = base::Time::Now();
|
||||||
// std::cout << "OnSwapCompositorFrame " << (now - last_time_).InMilliseconds() << " ms" << std::endl;
|
// std::cout << "OnSwapCompositorFrame " << (now - last_time_).InMilliseconds() << " ms" << std::endl;
|
||||||
// last_time_ = now;
|
// last_time_ = now;
|
||||||
TRACE_EVENT0("electron", "OffScreenWindow::OnSwapCompositorFrame");
|
TRACE_EVENT0("electron", "OffScreenRenderWidgetHostView::OnSwapCompositorFrame");
|
||||||
|
|
||||||
// std::cout << output_surface_id << std::endl;
|
// std::cout << output_surface_id << std::endl;
|
||||||
|
|
||||||
|
@ -654,56 +651,56 @@ void OffScreenWindow::OnSwapCompositorFrame(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::ClearCompositorFrame() {
|
void OffScreenRenderWidgetHostView::ClearCompositorFrame() {
|
||||||
// std::cout << "ClearCompositorFrame" << std::endl;
|
// std::cout << "ClearCompositorFrame" << std::endl;
|
||||||
delegated_frame_host_->ClearDelegatedFrame();
|
delegated_frame_host_->ClearDelegatedFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::InitAsPopup(
|
void OffScreenRenderWidgetHostView::InitAsPopup(
|
||||||
content::RenderWidgetHostView *, const gfx::Rect &) {
|
content::RenderWidgetHostView *, const gfx::Rect &) {
|
||||||
// std::cout << "InitAsPopup" << std::endl;
|
// std::cout << "InitAsPopup" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::InitAsFullscreen(content::RenderWidgetHostView *) {
|
void OffScreenRenderWidgetHostView::InitAsFullscreen(content::RenderWidgetHostView *) {
|
||||||
// std::cout << "InitAsFullscreen" << std::endl;
|
// std::cout << "InitAsFullscreen" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::UpdateCursor(const content::WebCursor &) {
|
void OffScreenRenderWidgetHostView::UpdateCursor(const content::WebCursor &) {
|
||||||
// std::cout << "UpdateCursor" << std::endl;
|
// std::cout << "UpdateCursor" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::SetIsLoading(bool loading) {
|
void OffScreenRenderWidgetHostView::SetIsLoading(bool loading) {
|
||||||
// std::cout << "SetIsLoading" << std::endl;
|
// std::cout << "SetIsLoading" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::TextInputStateChanged(
|
void OffScreenRenderWidgetHostView::TextInputStateChanged(
|
||||||
const content::TextInputState& params) {
|
const content::TextInputState& params) {
|
||||||
// std::cout << "TextInputStateChanged" << std::endl;
|
// std::cout << "TextInputStateChanged" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::ImeCancelComposition() {
|
void OffScreenRenderWidgetHostView::ImeCancelComposition() {
|
||||||
// std::cout << "ImeCancelComposition" << std::endl;
|
// std::cout << "ImeCancelComposition" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::RenderProcessGone(base::TerminationStatus,int) {
|
void OffScreenRenderWidgetHostView::RenderProcessGone(base::TerminationStatus,int) {
|
||||||
// std::cout << "RenderProcessGone" << std::endl;
|
// std::cout << "RenderProcessGone" << std::endl;
|
||||||
Destroy();
|
Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::Destroy() {
|
void OffScreenRenderWidgetHostView::Destroy() {
|
||||||
// std::cout << "Destroy" << std::endl;
|
// std::cout << "Destroy" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::SetTooltipText(const base::string16 &) {
|
void OffScreenRenderWidgetHostView::SetTooltipText(const base::string16 &) {
|
||||||
// std::cout << "SetTooltipText" << std::endl;
|
// std::cout << "SetTooltipText" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::SelectionBoundsChanged(
|
void OffScreenRenderWidgetHostView::SelectionBoundsChanged(
|
||||||
const ViewHostMsg_SelectionBounds_Params &) {
|
const ViewHostMsg_SelectionBounds_Params &) {
|
||||||
// std::cout << "SelectionBoundsChanged" << std::endl;
|
// std::cout << "SelectionBoundsChanged" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::CopyFromCompositingSurface(const gfx::Rect& src_subrect,
|
void OffScreenRenderWidgetHostView::CopyFromCompositingSurface(const gfx::Rect& src_subrect,
|
||||||
const gfx::Size& dst_size,
|
const gfx::Size& dst_size,
|
||||||
const content::ReadbackRequestCallback& callback,
|
const content::ReadbackRequestCallback& callback,
|
||||||
const SkColorType preferred_color_type) {
|
const SkColorType preferred_color_type) {
|
||||||
|
@ -712,7 +709,7 @@ void OffScreenWindow::CopyFromCompositingSurface(const gfx::Rect& src_subrect,
|
||||||
src_subrect, dst_size, callback, preferred_color_type);
|
src_subrect, dst_size, callback, preferred_color_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::CopyFromCompositingSurfaceToVideoFrame(
|
void OffScreenRenderWidgetHostView::CopyFromCompositingSurfaceToVideoFrame(
|
||||||
const gfx::Rect& src_subrect,
|
const gfx::Rect& src_subrect,
|
||||||
const scoped_refptr<media::VideoFrame>& target,
|
const scoped_refptr<media::VideoFrame>& target,
|
||||||
const base::Callback<void (const gfx::Rect&, bool)>& callback) {
|
const base::Callback<void (const gfx::Rect&, bool)>& callback) {
|
||||||
|
@ -721,28 +718,28 @@ void OffScreenWindow::CopyFromCompositingSurfaceToVideoFrame(
|
||||||
src_subrect, target, callback);
|
src_subrect, target, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OffScreenWindow::CanCopyToVideoFrame() const {
|
bool OffScreenRenderWidgetHostView::CanCopyToVideoFrame() const {
|
||||||
// std::cout << "CanCopyToVideoFrame" << std::endl;
|
// std::cout << "CanCopyToVideoFrame" << std::endl;
|
||||||
return delegated_frame_host_->CanCopyToVideoFrame();
|
return delegated_frame_host_->CanCopyToVideoFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::BeginFrameSubscription(
|
void OffScreenRenderWidgetHostView::BeginFrameSubscription(
|
||||||
std::unique_ptr<content::RenderWidgetHostViewFrameSubscriber> subscriber) {
|
std::unique_ptr<content::RenderWidgetHostViewFrameSubscriber> subscriber) {
|
||||||
// std::cout << "BeginFrameSubscription" << std::endl;
|
// std::cout << "BeginFrameSubscription" << std::endl;
|
||||||
delegated_frame_host_->BeginFrameSubscription(std::move(subscriber));
|
delegated_frame_host_->BeginFrameSubscription(std::move(subscriber));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::EndFrameSubscription() {
|
void OffScreenRenderWidgetHostView::EndFrameSubscription() {
|
||||||
// std::cout << "EndFrameSubscription" << std::endl;
|
// std::cout << "EndFrameSubscription" << std::endl;
|
||||||
delegated_frame_host_->EndFrameSubscription();
|
delegated_frame_host_->EndFrameSubscription();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OffScreenWindow::HasAcceleratedSurface(const gfx::Size &) {
|
bool OffScreenRenderWidgetHostView::HasAcceleratedSurface(const gfx::Size &) {
|
||||||
// std::cout << "HasAcceleratedSurface" << std::endl;
|
// std::cout << "HasAcceleratedSurface" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::GetScreenInfo(blink::WebScreenInfo* results) {
|
void OffScreenRenderWidgetHostView::GetScreenInfo(blink::WebScreenInfo* results) {
|
||||||
// std::cout << "GetScreenInfo" << std::endl;
|
// std::cout << "GetScreenInfo" << std::endl;
|
||||||
// std::cout << size_.width() << "x" << size_.height() << std::endl;
|
// std::cout << size_.width() << "x" << size_.height() << std::endl;
|
||||||
results->rect = gfx::Rect(size_);
|
results->rect = gfx::Rect(size_);
|
||||||
|
@ -754,84 +751,84 @@ void OffScreenWindow::GetScreenInfo(blink::WebScreenInfo* results) {
|
||||||
results->orientationType = blink::WebScreenOrientationLandscapePrimary;
|
results->orientationType = blink::WebScreenOrientationLandscapePrimary;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OffScreenWindow::GetScreenColorProfile(blink::WebVector<char>*) {
|
bool OffScreenRenderWidgetHostView::GetScreenColorProfile(blink::WebVector<char>*) {
|
||||||
// std::cout << "GetScreenColorProfile" << std::endl;
|
// std::cout << "GetScreenColorProfile" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Rect OffScreenWindow::GetBoundsInRootWindow() {
|
gfx::Rect OffScreenRenderWidgetHostView::GetBoundsInRootWindow() {
|
||||||
// std::cout << "GetBoundsInRootWindow" << std::endl;
|
// std::cout << "GetBoundsInRootWindow" << std::endl;
|
||||||
// std::cout << size_.width() << "x" << size_.height() << std::endl;
|
// std::cout << size_.width() << "x" << size_.height() << std::endl;
|
||||||
return gfx::Rect(size_);
|
return gfx::Rect(size_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::LockCompositingSurface() {
|
void OffScreenRenderWidgetHostView::LockCompositingSurface() {
|
||||||
// std::cout << "LockCompositingSurface" << std::endl;
|
// std::cout << "LockCompositingSurface" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::UnlockCompositingSurface() {
|
void OffScreenRenderWidgetHostView::UnlockCompositingSurface() {
|
||||||
// std::cout << "UnlockCompositingSurface" << std::endl;
|
// std::cout << "UnlockCompositingSurface" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::ImeCompositionRangeChanged(
|
void OffScreenRenderWidgetHostView::ImeCompositionRangeChanged(
|
||||||
const gfx::Range &, const std::vector<gfx::Rect>&) {
|
const gfx::Range &, const std::vector<gfx::Rect>&) {
|
||||||
// std::cout << "ImeCompositionRangeChanged" << std::endl;
|
// std::cout << "ImeCompositionRangeChanged" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Size OffScreenWindow::GetPhysicalBackingSize() const {
|
gfx::Size OffScreenRenderWidgetHostView::GetPhysicalBackingSize() const {
|
||||||
// std::cout << "GetPhysicalBackingSize" << std::endl;
|
// std::cout << "GetPhysicalBackingSize" << std::endl;
|
||||||
return size_;
|
return size_;
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Size OffScreenWindow::GetRequestedRendererSize() const {
|
gfx::Size OffScreenRenderWidgetHostView::GetRequestedRendererSize() const {
|
||||||
// std::cout << "GetRequestedRendererSize" << std::endl;
|
// std::cout << "GetRequestedRendererSize" << std::endl;
|
||||||
return size_;
|
return size_;
|
||||||
}
|
}
|
||||||
|
|
||||||
int OffScreenWindow::DelegatedFrameHostGetGpuMemoryBufferClientId() const {
|
int OffScreenRenderWidgetHostView::DelegatedFrameHostGetGpuMemoryBufferClientId() const {
|
||||||
// std::cout << "DelegatedFrameHostGetGpuMemoryBufferClientId" << std::endl;
|
// std::cout << "DelegatedFrameHostGetGpuMemoryBufferClientId" << std::endl;
|
||||||
return render_widget_host_->GetProcess()->GetID();
|
return render_widget_host_->GetProcess()->GetID();
|
||||||
}
|
}
|
||||||
|
|
||||||
ui::Layer* OffScreenWindow::DelegatedFrameHostGetLayer() const {
|
ui::Layer* OffScreenRenderWidgetHostView::DelegatedFrameHostGetLayer() const {
|
||||||
// std::cout << "DelegatedFrameHostGetLayer" << std::endl;
|
// std::cout << "DelegatedFrameHostGetLayer" << std::endl;
|
||||||
return const_cast<ui::Layer*>(root_layer_.get());
|
return const_cast<ui::Layer*>(root_layer_.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OffScreenWindow::DelegatedFrameHostIsVisible() const {
|
bool OffScreenRenderWidgetHostView::DelegatedFrameHostIsVisible() const {
|
||||||
// std::cout << "DelegatedFrameHostIsVisible" << std::endl;
|
// std::cout << "DelegatedFrameHostIsVisible" << std::endl;
|
||||||
// std::cout << !render_widget_host_->is_hidden() << std::endl;
|
// std::cout << !render_widget_host_->is_hidden() << std::endl;
|
||||||
return !render_widget_host_->is_hidden();
|
return !render_widget_host_->is_hidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
SkColor OffScreenWindow::DelegatedFrameHostGetGutterColor(SkColor color) const {
|
SkColor OffScreenRenderWidgetHostView::DelegatedFrameHostGetGutterColor(SkColor color) const {
|
||||||
// std::cout << "DelegatedFrameHostGetGutterColor" << std::endl;
|
// std::cout << "DelegatedFrameHostGetGutterColor" << std::endl;
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Size OffScreenWindow::DelegatedFrameHostDesiredSizeInDIP() const {
|
gfx::Size OffScreenRenderWidgetHostView::DelegatedFrameHostDesiredSizeInDIP() const {
|
||||||
// std::cout << "DelegatedFrameHostDesiredSizeInDIP" << std::endl;
|
// std::cout << "DelegatedFrameHostDesiredSizeInDIP" << std::endl;
|
||||||
// std::cout << size_.width() << "x" << size_.height() << std::endl;
|
// std::cout << size_.width() << "x" << size_.height() << std::endl;
|
||||||
return size_;
|
return size_;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OffScreenWindow::DelegatedFrameCanCreateResizeLock() const {
|
bool OffScreenRenderWidgetHostView::DelegatedFrameCanCreateResizeLock() const {
|
||||||
// std::cout << "DelegatedFrameCanCreateResizeLock" << std::endl;
|
// std::cout << "DelegatedFrameCanCreateResizeLock" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<content::ResizeLock>
|
std::unique_ptr<content::ResizeLock>
|
||||||
OffScreenWindow::DelegatedFrameHostCreateResizeLock(bool) {
|
OffScreenRenderWidgetHostView::DelegatedFrameHostCreateResizeLock(bool) {
|
||||||
// std::cout << "DelegatedFrameHostCreateResizeLock" << std::endl;
|
// std::cout << "DelegatedFrameHostCreateResizeLock" << std::endl;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::DelegatedFrameHostResizeLockWasReleased() {
|
void OffScreenRenderWidgetHostView::DelegatedFrameHostResizeLockWasReleased() {
|
||||||
// std::cout << "DelegatedFrameHostResizeLockWasReleased" << std::endl;
|
// std::cout << "DelegatedFrameHostResizeLockWasReleased" << std::endl;
|
||||||
return render_widget_host_->WasResized();
|
return render_widget_host_->WasResized();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::DelegatedFrameHostSendCompositorSwapAck(
|
void OffScreenRenderWidgetHostView::DelegatedFrameHostSendCompositorSwapAck(
|
||||||
int output_surface_id, const cc::CompositorFrameAck& ack) {
|
int output_surface_id, const cc::CompositorFrameAck& ack) {
|
||||||
// std::cout << "DelegatedFrameHostSendCompositorSwapAck" << std::endl;
|
// std::cout << "DelegatedFrameHostSendCompositorSwapAck" << std::endl;
|
||||||
// std::cout << output_surface_id << std::endl;
|
// std::cout << output_surface_id << std::endl;
|
||||||
|
@ -840,7 +837,7 @@ void OffScreenWindow::DelegatedFrameHostSendCompositorSwapAck(
|
||||||
output_surface_id, ack));
|
output_surface_id, ack));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::DelegatedFrameHostSendReclaimCompositorResources(
|
void OffScreenRenderWidgetHostView::DelegatedFrameHostSendReclaimCompositorResources(
|
||||||
int output_surface_id, const cc::CompositorFrameAck& ack) {
|
int output_surface_id, const cc::CompositorFrameAck& ack) {
|
||||||
// std::cout << "DelegatedFrameHostSendReclaimCompositorResources" << std::endl;
|
// std::cout << "DelegatedFrameHostSendReclaimCompositorResources" << std::endl;
|
||||||
// std::cout << output_surface_id << std::endl;
|
// std::cout << output_surface_id << std::endl;
|
||||||
|
@ -849,30 +846,30 @@ void OffScreenWindow::DelegatedFrameHostSendReclaimCompositorResources(
|
||||||
output_surface_id, ack));
|
output_surface_id, ack));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::DelegatedFrameHostOnLostCompositorResources() {
|
void OffScreenRenderWidgetHostView::DelegatedFrameHostOnLostCompositorResources() {
|
||||||
// std::cout << "DelegatedFrameHostOnLostCompositorResources" << std::endl;
|
// std::cout << "DelegatedFrameHostOnLostCompositorResources" << std::endl;
|
||||||
render_widget_host_->ScheduleComposite();
|
render_widget_host_->ScheduleComposite();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::DelegatedFrameHostUpdateVSyncParameters(
|
void OffScreenRenderWidgetHostView::DelegatedFrameHostUpdateVSyncParameters(
|
||||||
const base::TimeTicks& timebase, const base::TimeDelta& interval) {
|
const base::TimeTicks& timebase, const base::TimeDelta& interval) {
|
||||||
// std::cout << "DelegatedFrameHostUpdateVSyncParameters" << std::endl;
|
// std::cout << "DelegatedFrameHostUpdateVSyncParameters" << std::endl;
|
||||||
render_widget_host_->UpdateVSyncParameters(timebase, interval);
|
render_widget_host_->UpdateVSyncParameters(timebase, interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<cc::SoftwareOutputDevice>
|
std::unique_ptr<cc::SoftwareOutputDevice>
|
||||||
OffScreenWindow::CreateSoftwareOutputDevice(ui::Compositor* compositor) {
|
OffScreenRenderWidgetHostView::CreateSoftwareOutputDevice(ui::Compositor* compositor) {
|
||||||
DCHECK_EQ(compositor_.get(), compositor);
|
DCHECK_EQ(compositor_.get(), compositor);
|
||||||
DCHECK(!copy_frame_generator_);
|
DCHECK(!copy_frame_generator_);
|
||||||
DCHECK(!software_output_device_);
|
DCHECK(!software_output_device_);
|
||||||
|
|
||||||
software_output_device_ = new OffScreenOutputDevice(true,
|
software_output_device_ = new OffScreenOutputDevice(true,
|
||||||
base::Bind(&OffScreenWindow::OnPaint,
|
base::Bind(&OffScreenRenderWidgetHostView::OnPaint,
|
||||||
weak_ptr_factory_.GetWeakPtr()));
|
weak_ptr_factory_.GetWeakPtr()));
|
||||||
return base::WrapUnique(software_output_device_);
|
return base::WrapUnique(software_output_device_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::OnSetNeedsBeginFrames(bool enabled) {
|
void OffScreenRenderWidgetHostView::OnSetNeedsBeginFrames(bool enabled) {
|
||||||
SetFrameRate();
|
SetFrameRate();
|
||||||
|
|
||||||
begin_frame_timer_->SetActive(enabled);
|
begin_frame_timer_->SetActive(enabled);
|
||||||
|
@ -883,7 +880,7 @@ void OffScreenWindow::OnSetNeedsBeginFrames(bool enabled) {
|
||||||
// std::cout << "OnSetNeedsBeginFrames" << enabled << std::endl;
|
// std::cout << "OnSetNeedsBeginFrames" << enabled << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::SetFrameRate() {
|
void OffScreenRenderWidgetHostView::SetFrameRate() {
|
||||||
// Only set the frame rate one time.
|
// Only set the frame rate one time.
|
||||||
// if (frame_rate_threshold_ms_ != 0)
|
// if (frame_rate_threshold_ms_ != 0)
|
||||||
// return;
|
// return;
|
||||||
|
@ -905,28 +902,28 @@ void OffScreenWindow::SetFrameRate() {
|
||||||
} else {
|
} else {
|
||||||
begin_frame_timer_.reset(new AtomBeginFrameTimer(
|
begin_frame_timer_.reset(new AtomBeginFrameTimer(
|
||||||
frame_rate_threshold_ms_,
|
frame_rate_threshold_ms_,
|
||||||
base::Bind(&OffScreenWindow::OnBeginFrameTimerTick,
|
base::Bind(&OffScreenRenderWidgetHostView::OnBeginFrameTimerTick,
|
||||||
weak_ptr_factory_.GetWeakPtr())));
|
weak_ptr_factory_.GetWeakPtr())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::SetBeginFrameSource(
|
void OffScreenRenderWidgetHostView::SetBeginFrameSource(
|
||||||
cc::BeginFrameSource* source) {
|
cc::BeginFrameSource* source) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OffScreenWindow::IsAutoResizeEnabled() const {
|
bool OffScreenRenderWidgetHostView::IsAutoResizeEnabled() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWindow::OnPaint(
|
void OffScreenRenderWidgetHostView::OnPaint(
|
||||||
const gfx::Rect& damage_rect,
|
const gfx::Rect& damage_rect,
|
||||||
int bitmap_width,
|
int bitmap_width,
|
||||||
int bitmap_height,
|
int bitmap_height,
|
||||||
void* bitmap_pixels) {
|
void* bitmap_pixels) {
|
||||||
TRACE_EVENT0("electron", "OffScreenWindow::OnPaint");
|
TRACE_EVENT0("electron", "OffScreenRenderWidgetHostView::OnPaint");
|
||||||
|
|
||||||
if (paintCallback) {
|
if (callback_) {
|
||||||
paintCallback->Run(damage_rect, bitmap_width, bitmap_height, bitmap_pixels);
|
callback_->Run(damage_rect, bitmap_width, bitmap_height, bitmap_pixels);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
// Use of this source code is governed by the MIT license that can be
|
// Use of this source code is governed by the MIT license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
#ifndef ATOM_BROWSER_OSR_WINDOW_H_
|
#ifndef ATOM_BROWSER_OSR_RENDER_WIDGET_HOST_VIEW_H_
|
||||||
#define ATOM_BROWSER_OSR_WINDOW_H_
|
#define ATOM_BROWSER_OSR_RENDER_WIDGET_HOST_VIEW_H_
|
||||||
|
|
||||||
#include "atom/browser/native_window.h"
|
#include "atom/browser/native_window.h"
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ namespace atom {
|
||||||
class AtomCopyFrameGenerator;
|
class AtomCopyFrameGenerator;
|
||||||
class AtomBeginFrameTimer;
|
class AtomBeginFrameTimer;
|
||||||
|
|
||||||
class OffScreenWindow
|
class OffScreenRenderWidgetHostView
|
||||||
: public content::RenderWidgetHostViewBase,
|
: public content::RenderWidgetHostViewBase,
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
public ui::AcceleratedWidgetMacNSView,
|
public ui::AcceleratedWidgetMacNSView,
|
||||||
|
@ -65,8 +65,8 @@ class OffScreenWindow
|
||||||
public ui::CompositorDelegate,
|
public ui::CompositorDelegate,
|
||||||
public content::DelegatedFrameHostClient {
|
public content::DelegatedFrameHostClient {
|
||||||
public:
|
public:
|
||||||
OffScreenWindow(content::RenderWidgetHost*, NativeWindow*);
|
OffScreenRenderWidgetHostView(content::RenderWidgetHost*, NativeWindow*);
|
||||||
~OffScreenWindow();
|
~OffScreenRenderWidgetHostView();
|
||||||
|
|
||||||
void CreatePlatformWidget();
|
void CreatePlatformWidget();
|
||||||
|
|
||||||
|
@ -187,7 +187,6 @@ public:
|
||||||
void SendBeginFrame(base::TimeTicks frame_time,
|
void SendBeginFrame(base::TimeTicks frame_time,
|
||||||
base::TimeDelta vsync_period);
|
base::TimeDelta vsync_period);
|
||||||
|
|
||||||
std::unique_ptr<const atom::OnPaintCallback> paintCallback;
|
|
||||||
void SetPaintCallback(const atom::OnPaintCallback*);
|
void SetPaintCallback(const atom::OnPaintCallback*);
|
||||||
|
|
||||||
void OnPaint(const gfx::Rect& damage_rect,
|
void OnPaint(const gfx::Rect& damage_rect,
|
||||||
|
@ -207,6 +206,8 @@ private:
|
||||||
|
|
||||||
OffScreenOutputDevice* software_output_device_;
|
OffScreenOutputDevice* software_output_device_;
|
||||||
|
|
||||||
|
std::unique_ptr<const atom::OnPaintCallback> callback_;
|
||||||
|
|
||||||
int frame_rate_threshold_ms_;
|
int frame_rate_threshold_ms_;
|
||||||
|
|
||||||
base::Time last_time_;
|
base::Time last_time_;
|
||||||
|
@ -249,10 +250,10 @@ private:
|
||||||
gfx::Rect first_selection_rect_;
|
gfx::Rect first_selection_rect_;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
base::WeakPtrFactory<OffScreenWindow> weak_ptr_factory_;
|
base::WeakPtrFactory<OffScreenRenderWidgetHostView> weak_ptr_factory_;
|
||||||
DISALLOW_COPY_AND_ASSIGN(OffScreenWindow);
|
DISALLOW_COPY_AND_ASSIGN(OffScreenRenderWidgetHostView);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace atom
|
} // namespace atom
|
||||||
|
|
||||||
#endif // ATOM_BROWSER_OSR_WINDOW_H_
|
#endif // ATOM_BROWSER_OSR_RENDER_WIDGET_HOST_VIEW_H_
|
|
@ -1,4 +1,4 @@
|
||||||
#include "atom/browser/osr_window.h"
|
#include "atom/browser/osr_render_widget_host_view.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
@ -13,47 +13,47 @@
|
||||||
#include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
|
#include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
|
||||||
#include "ui/events/latency_info.h"
|
#include "ui/events/latency_info.h"
|
||||||
|
|
||||||
ui::AcceleratedWidgetMac* atom::OffScreenWindow::GetAcceleratedWidgetMac()
|
ui::AcceleratedWidgetMac* atom::OffScreenRenderWidgetHostView::GetAcceleratedWidgetMac()
|
||||||
const {
|
const {
|
||||||
if (browser_compositor_)
|
if (browser_compositor_)
|
||||||
return browser_compositor_->accelerated_widget_mac();
|
return browser_compositor_->accelerated_widget_mac();
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSView* atom::OffScreenWindow::AcceleratedWidgetGetNSView() const {
|
NSView* atom::OffScreenRenderWidgetHostView::AcceleratedWidgetGetNSView() const {
|
||||||
return [window_ contentView];
|
return [window_ contentView];
|
||||||
}
|
}
|
||||||
|
|
||||||
void atom::OffScreenWindow::AcceleratedWidgetGetVSyncParameters(
|
void atom::OffScreenRenderWidgetHostView::AcceleratedWidgetGetVSyncParameters(
|
||||||
base::TimeTicks* timebase, base::TimeDelta* interval) const {
|
base::TimeTicks* timebase, base::TimeDelta* interval) const {
|
||||||
*timebase = base::TimeTicks();
|
*timebase = base::TimeTicks();
|
||||||
*interval = base::TimeDelta();
|
*interval = base::TimeDelta();
|
||||||
}
|
}
|
||||||
|
|
||||||
void atom::OffScreenWindow::AcceleratedWidgetSwapCompleted() {
|
void atom::OffScreenRenderWidgetHostView::AcceleratedWidgetSwapCompleted() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void atom::OffScreenWindow::SetActive(bool active) {
|
void atom::OffScreenRenderWidgetHostView::SetActive(bool active) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void atom::OffScreenWindow::ShowDefinitionForSelection() {
|
void atom::OffScreenRenderWidgetHostView::ShowDefinitionForSelection() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool atom::OffScreenWindow::SupportsSpeech() const {
|
bool atom::OffScreenRenderWidgetHostView::SupportsSpeech() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void atom::OffScreenWindow::SpeakSelection() {
|
void atom::OffScreenRenderWidgetHostView::SpeakSelection() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool atom::OffScreenWindow::IsSpeaking() const {
|
bool atom::OffScreenRenderWidgetHostView::IsSpeaking() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void atom::OffScreenWindow::StopSpeaking() {
|
void atom::OffScreenRenderWidgetHostView::StopSpeaking() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void atom::OffScreenWindow::SelectionChanged(
|
void atom::OffScreenRenderWidgetHostView::SelectionChanged(
|
||||||
const base::string16& text,
|
const base::string16& text,
|
||||||
size_t offset,
|
size_t offset,
|
||||||
const gfx::Range& range) {
|
const gfx::Range& range) {
|
||||||
|
@ -74,7 +74,7 @@ void atom::OffScreenWindow::SelectionChanged(
|
||||||
RenderWidgetHostViewBase::SelectionChanged(text, offset, range);
|
RenderWidgetHostViewBase::SelectionChanged(text, offset, range);
|
||||||
}
|
}
|
||||||
|
|
||||||
void atom::OffScreenWindow::CreatePlatformWidget() {
|
void atom::OffScreenRenderWidgetHostView::CreatePlatformWidget() {
|
||||||
// Create a borderless non-visible 1x1 window.
|
// Create a borderless non-visible 1x1 window.
|
||||||
window_ = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 1, 1)
|
window_ = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 1, 1)
|
||||||
styleMask:NSBorderlessWindowMask
|
styleMask:NSBorderlessWindowMask
|
||||||
|
@ -102,7 +102,7 @@ void atom::OffScreenWindow::CreatePlatformWidget() {
|
||||||
browser_compositor_->Unsuspend();
|
browser_compositor_->Unsuspend();
|
||||||
}
|
}
|
||||||
|
|
||||||
// void atom::OffScreenWindow::PlatformDestroyCompositorWidget() {
|
// void atom::OffScreenRenderWidgetHostView::PlatformDestroyCompositorWidget() {
|
||||||
// DCHECK(window_);
|
// DCHECK(window_);
|
||||||
//
|
//
|
||||||
// browser_compositor_->Destroy();
|
// browser_compositor_->Destroy();
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#include "atom/browser/osr_window.h"
|
#include "atom/browser/osr_render_widget_host_view.h"
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ private:
|
||||||
DISALLOW_COPY_AND_ASSIGN(DummyWindowWin);
|
DISALLOW_COPY_AND_ASSIGN(DummyWindowWin);
|
||||||
};
|
};
|
||||||
|
|
||||||
void OffScreenWindow::CreatePlatformWidget() {
|
void OffScreenRenderWidgetHostView::CreatePlatformWidget() {
|
||||||
DCHECK(!window_);
|
DCHECK(!window_);
|
||||||
window_.reset(new DummyWindowWin());
|
window_.reset(new DummyWindowWin());
|
||||||
compositor_widget_ = window_->hwnd();
|
compositor_widget_ = window_->hwnd();
|
|
@ -4,17 +4,16 @@
|
||||||
|
|
||||||
#include "atom/browser/osr_web_contents_view.h"
|
#include "atom/browser/osr_web_contents_view.h"
|
||||||
|
|
||||||
#include "atom/browser/osr_window.h"
|
#include "atom/browser/osr_render_widget_host_view.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
OffScreenWebContentsView::OffScreenWebContentsView() : web_contents_(nullptr) {
|
OffScreenWebContentsView::OffScreenWebContentsView():
|
||||||
// std::cout << "OffScreenWebContentsView" << std::endl;
|
web_contents_(nullptr) {
|
||||||
//std::this_thread::sleep_for(std::chrono::milliseconds(10000));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OffScreenWebContentsView::~OffScreenWebContentsView() {
|
OffScreenWebContentsView::~OffScreenWebContentsView() {
|
||||||
// std::cout << "~OffScreenWebContentsView" << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffScreenWebContentsView::SetWebContents(
|
void OffScreenWebContentsView::SetWebContents(
|
||||||
|
@ -114,9 +113,9 @@ void OffScreenWebContentsView::CreateView(
|
||||||
content::RenderWidgetHostViewBase*
|
content::RenderWidgetHostViewBase*
|
||||||
OffScreenWebContentsView::CreateViewForWidget(
|
OffScreenWebContentsView::CreateViewForWidget(
|
||||||
content::RenderWidgetHost* render_widget_host, bool is_guest_view_hack){
|
content::RenderWidgetHost* render_widget_host, bool is_guest_view_hack){
|
||||||
// std::cout << "CreateViewForWidget" << std::endl;
|
|
||||||
auto relay = NativeWindowRelay::FromWebContents(web_contents_);
|
auto relay = NativeWindowRelay::FromWebContents(web_contents_);
|
||||||
view_ = new OffScreenWindow(render_widget_host, relay->window.get());
|
view_ = new OffScreenRenderWidgetHostView(render_widget_host,
|
||||||
|
relay->window.get());
|
||||||
return view_;
|
return view_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,9 +123,9 @@ content::RenderWidgetHostViewBase*
|
||||||
content::RenderWidgetHostViewBase*
|
content::RenderWidgetHostViewBase*
|
||||||
OffScreenWebContentsView::CreateViewForPopupWidget(
|
OffScreenWebContentsView::CreateViewForPopupWidget(
|
||||||
content::RenderWidgetHost* render_widget_host){
|
content::RenderWidgetHost* render_widget_host){
|
||||||
// std::cout << "CreateViewForPopupWidget" << std::endl;
|
|
||||||
auto relay = NativeWindowRelay::FromWebContents(web_contents_);
|
auto relay = NativeWindowRelay::FromWebContents(web_contents_);
|
||||||
view_ = new OffScreenWindow(render_widget_host, relay->window.get());
|
view_ = new OffScreenRenderWidgetHostView(render_widget_host,
|
||||||
|
relay->window.get());
|
||||||
return view_;
|
return view_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace atom {
|
||||||
class OffScreenWebContentsView : public content::WebContentsView,
|
class OffScreenWebContentsView : public content::WebContentsView,
|
||||||
public content::RenderViewHostDelegateView {
|
public content::RenderViewHostDelegateView {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
OffScreenWebContentsView();
|
OffScreenWebContentsView();
|
||||||
~OffScreenWebContentsView();
|
~OffScreenWebContentsView();
|
||||||
|
|
||||||
|
|
|
@ -38,11 +38,6 @@ exports.load = (appUrl) => {
|
||||||
})
|
})
|
||||||
mainWindow1.loadURL(appUrl)
|
mainWindow1.loadURL(appUrl)
|
||||||
mainWindow1.focus()
|
mainWindow1.focus()
|
||||||
mainWindow1.webContents.on('dom-ready', () => {
|
|
||||||
mainWindow1.webContents.beginFrameSubscription(() => {
|
|
||||||
console.log("asd")
|
|
||||||
})
|
|
||||||
})
|
|
||||||
var start1, end1
|
var start1, end1
|
||||||
start1 = +new Date();
|
start1 = +new Date();
|
||||||
mainWindow1.webContents.on('paint', (e, rect, w, h, data) => {
|
mainWindow1.webContents.on('paint', (e, rect, w, h, data) => {
|
||||||
|
@ -76,11 +71,6 @@ exports.load = (appUrl) => {
|
||||||
})
|
})
|
||||||
mainWindow2.loadURL("http://4danatomy.com")
|
mainWindow2.loadURL("http://4danatomy.com")
|
||||||
mainWindow2.focus()
|
mainWindow2.focus()
|
||||||
/*mainWindow2.webContents.on('dom-ready', () => {
|
|
||||||
mainWindow2.webContents.beginFrameSubscription(() => {
|
|
||||||
console.log("asd")
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
var start2, end2
|
var start2, end2
|
||||||
start2 = +new Date();
|
start2 = +new Date();
|
||||||
|
@ -106,11 +96,6 @@ exports.load = (appUrl) => {
|
||||||
})
|
})
|
||||||
mainWindow3.loadURL(appUrl)
|
mainWindow3.loadURL(appUrl)
|
||||||
mainWindow3.focus()
|
mainWindow3.focus()
|
||||||
mainWindow3.webContents.on('dom-ready', () => {
|
|
||||||
mainWindow3.webContents.beginFrameSubscription(() => {
|
|
||||||
console.log("asd")
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
var start3, end3
|
var start3, end3
|
||||||
start3 = +new Date();
|
start3 = +new Date();
|
||||||
|
@ -136,11 +121,6 @@ exports.load = (appUrl) => {
|
||||||
})
|
})
|
||||||
mainWindow4.loadURL(appUrl)
|
mainWindow4.loadURL(appUrl)
|
||||||
mainWindow4.focus()
|
mainWindow4.focus()
|
||||||
mainWindow4.webContents.on('dom-ready', () => {
|
|
||||||
mainWindow4.webContents.beginFrameSubscription(() => {
|
|
||||||
console.log("asd")
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
var start4, end4
|
var start4, end4
|
||||||
start4 = +new Date();
|
start4 = +new Date();
|
||||||
|
@ -166,11 +146,6 @@ exports.load = (appUrl) => {
|
||||||
})
|
})
|
||||||
mainWindow5.loadURL(appUrl)
|
mainWindow5.loadURL(appUrl)
|
||||||
mainWindow5.focus()
|
mainWindow5.focus()
|
||||||
mainWindow5.webContents.on('dom-ready', () => {
|
|
||||||
mainWindow5.webContents.beginFrameSubscription(() => {
|
|
||||||
console.log("asd")
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
var start5, end5
|
var start5, end5
|
||||||
start5 = +new Date();
|
start5 = +new Date();
|
||||||
|
@ -196,11 +171,6 @@ exports.load = (appUrl) => {
|
||||||
})
|
})
|
||||||
mainWindow6.loadURL(appUrl)
|
mainWindow6.loadURL(appUrl)
|
||||||
mainWindow6.focus()
|
mainWindow6.focus()
|
||||||
mainWindow6.webContents.on('dom-ready', () => {
|
|
||||||
mainWindow6.webContents.beginFrameSubscription(() => {
|
|
||||||
console.log("asd")
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
var start6, end6
|
var start6, end6
|
||||||
start6 = +new Date();
|
start6 = +new Date();
|
||||||
|
@ -226,11 +196,6 @@ exports.load = (appUrl) => {
|
||||||
})
|
})
|
||||||
mainWindow7.loadURL(appUrl)
|
mainWindow7.loadURL(appUrl)
|
||||||
mainWindow7.focus()
|
mainWindow7.focus()
|
||||||
mainWindow7.webContents.on('dom-ready', () => {
|
|
||||||
mainWindow7.webContents.beginFrameSubscription(() => {
|
|
||||||
console.log("asd")
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
var start7, end7
|
var start7, end7
|
||||||
start7 = +new Date();
|
start7 = +new Date();
|
||||||
|
@ -256,11 +221,6 @@ exports.load = (appUrl) => {
|
||||||
})
|
})
|
||||||
mainWindow8.loadURL(appUrl)
|
mainWindow8.loadURL(appUrl)
|
||||||
mainWindow8.focus()
|
mainWindow8.focus()
|
||||||
mainWindow8.webContents.on('dom-ready', () => {
|
|
||||||
mainWindow8.webContents.beginFrameSubscription(() => {
|
|
||||||
console.log("asd")
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
var start8, end8
|
var start8, end8
|
||||||
start8 = +new Date();
|
start8 = +new Date();
|
||||||
|
|
|
@ -210,10 +210,10 @@
|
||||||
'atom/browser/osr_web_contents_view.h',
|
'atom/browser/osr_web_contents_view.h',
|
||||||
'atom/browser/osr_output_device.cc',
|
'atom/browser/osr_output_device.cc',
|
||||||
'atom/browser/osr_output_device.h',
|
'atom/browser/osr_output_device.h',
|
||||||
'atom/browser/osr_window.cc',
|
'atom/browser/osr_render_widget_host_view.cc',
|
||||||
'atom/browser/osr_window.h',
|
'atom/browser/osr_render_widget_host_view.h',
|
||||||
'atom/browser/osr_window_win.cc',
|
'atom/browser/osr_render_widget_host_view_win.cc',
|
||||||
'atom/browser/osr_window_mac.mm',
|
'atom/browser/osr_render_widget_host_view_mac.mm',
|
||||||
'atom/browser/net/asar/asar_protocol_handler.cc',
|
'atom/browser/net/asar/asar_protocol_handler.cc',
|
||||||
'atom/browser/net/asar/asar_protocol_handler.h',
|
'atom/browser/net/asar/asar_protocol_handler.h',
|
||||||
'atom/browser/net/asar/url_request_asar_job.cc',
|
'atom/browser/net/asar/url_request_asar_job.cc',
|
||||||
|
|
Loading…
Add table
Reference in a new issue