mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision 2b3ae3b8 (#394939)
This commit is contained in:
@@ -20,10 +20,11 @@
|
||||
#include "cc/base/switches.h"
|
||||
#include "cc/output/copy_output_request.h"
|
||||
#include "cc/scheduler/delay_based_time_source.h"
|
||||
#include "components/display_compositor/gl_helper.h"
|
||||
#include "content/browser/bad_message.h"
|
||||
#include "content/browser/compositor/gl_helper.h"
|
||||
#include "content/browser/compositor/image_transport_factory.h"
|
||||
#include "content/browser/renderer_host/dip_util.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_delegate.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_impl.h"
|
||||
#include "content/browser/renderer_host/resize_lock.h"
|
||||
#include "content/common/view_messages.h"
|
||||
@@ -251,7 +252,7 @@ class CefCopyFrameGenerator {
|
||||
|
||||
content::ImageTransportFactory* factory =
|
||||
content::ImageTransportFactory::GetInstance();
|
||||
content::GLHelper* gl_helper = factory->GetGLHelper();
|
||||
display_compositor::GLHelper* gl_helper = factory->GetGLHelper();
|
||||
if (!gl_helper)
|
||||
return;
|
||||
|
||||
@@ -283,7 +284,7 @@ class CefCopyFrameGenerator {
|
||||
damage_rect,
|
||||
base::Passed(&bitmap_),
|
||||
base::Passed(&bitmap_pixels_lock)),
|
||||
content::GLHelper::SCALER_QUALITY_FAST);
|
||||
display_compositor::GLHelper::SCALER_QUALITY_FAST);
|
||||
}
|
||||
|
||||
static void CopyFromCompositingSurfaceFinishedProxy(
|
||||
@@ -296,7 +297,7 @@ class CefCopyFrameGenerator {
|
||||
// This method may be called after the view has been deleted.
|
||||
gpu::SyncToken sync_token;
|
||||
if (result) {
|
||||
content::GLHelper* gl_helper =
|
||||
display_compositor::GLHelper* gl_helper =
|
||||
content::ImageTransportFactory::GetInstance()->GetGLHelper();
|
||||
if (gl_helper)
|
||||
gl_helper->GenerateSyncToken(&sync_token);
|
||||
@@ -552,10 +553,6 @@ gfx::NativeView CefRenderWidgetHostViewOSR::GetNativeView() const {
|
||||
return gfx::NativeView();
|
||||
}
|
||||
|
||||
gfx::NativeViewId CefRenderWidgetHostViewOSR::GetNativeViewId() const {
|
||||
return gfx::NativeViewId();
|
||||
}
|
||||
|
||||
gfx::NativeViewAccessible
|
||||
CefRenderWidgetHostViewOSR::GetNativeViewAccessible() {
|
||||
return gfx::NativeViewAccessible();
|
||||
@@ -788,8 +785,8 @@ void CefRenderWidgetHostViewOSR::SetIsLoading(bool is_loading) {
|
||||
}
|
||||
|
||||
#if !defined(OS_MACOSX)
|
||||
void CefRenderWidgetHostViewOSR::UpdateInputMethodIfNecessary(
|
||||
bool text_input_state_changed) {
|
||||
void CefRenderWidgetHostViewOSR::TextInputStateChanged(
|
||||
const content::TextInputState& params) {
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::ImeCancelComposition() {
|
||||
@@ -1017,6 +1014,19 @@ bool CefRenderWidgetHostViewOSR::DelegatedFrameHostIsVisible() const {
|
||||
return !render_widget_host_->is_hidden();
|
||||
}
|
||||
|
||||
SkColor CefRenderWidgetHostViewOSR::DelegatedFrameHostGetGutterColor(
|
||||
SkColor color) const {
|
||||
// When making an element on the page fullscreen the element's background
|
||||
// may not match the page's, so use black as the gutter color to avoid
|
||||
// flashes of brighter colors during the transition.
|
||||
if (render_widget_host_->delegate() &&
|
||||
render_widget_host_->delegate()->IsFullscreenForCurrentTab(
|
||||
render_widget_host_)) {
|
||||
return SK_ColorBLACK;
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
gfx::Size
|
||||
CefRenderWidgetHostViewOSR::DelegatedFrameHostDesiredSizeInDIP() const {
|
||||
return root_layer_->bounds().size();
|
||||
@@ -1068,6 +1078,13 @@ void CefRenderWidgetHostViewOSR::DelegatedFrameHostUpdateVSyncParameters(
|
||||
render_widget_host_->UpdateVSyncParameters(timebase, interval);
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::SetBeginFrameSource(
|
||||
cc::BeginFrameSource* source) {
|
||||
// TODO(cef): Maybe we can use this method in combination with
|
||||
// OnSetNeedsBeginFrames() instead of using CefBeginFrameTimer.
|
||||
// See https://codereview.chromium.org/1841083007.
|
||||
}
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::InstallTransparency() {
|
||||
if (transparent_) {
|
||||
SetBackgroundColor(SkColor());
|
||||
|
@@ -96,7 +96,6 @@ class CefRenderWidgetHostViewOSR
|
||||
void SetBounds(const gfx::Rect& rect) override;
|
||||
gfx::Vector2dF GetLastScrollOffset() const override;
|
||||
gfx::NativeView GetNativeView() const override;
|
||||
gfx::NativeViewId GetNativeViewId() const override;
|
||||
gfx::NativeViewAccessible GetNativeViewAccessible() override;
|
||||
ui::TextInputClient* GetTextInputClient() override;
|
||||
void Focus() override;
|
||||
@@ -111,6 +110,7 @@ class CefRenderWidgetHostViewOSR
|
||||
void UnlockMouse() override;
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac() const override;
|
||||
void SetActive(bool active) override;
|
||||
void ShowDefinitionForSelection() override;
|
||||
bool SupportsSpeech() const override;
|
||||
@@ -130,7 +130,7 @@ class CefRenderWidgetHostViewOSR
|
||||
content::RenderWidgetHostView* reference_host_view) override;
|
||||
void UpdateCursor(const content::WebCursor& cursor) override;
|
||||
void SetIsLoading(bool is_loading) override;
|
||||
void UpdateInputMethodIfNecessary(bool text_input_state_changed) override;
|
||||
void TextInputStateChanged(const content::TextInputState& params) override;
|
||||
void ImeCancelComposition() override;
|
||||
void RenderProcessGone(base::TerminationStatus status,
|
||||
int error_code) override;
|
||||
@@ -203,6 +203,7 @@ class CefRenderWidgetHostViewOSR
|
||||
// DelegatedFrameHostClient implementation.
|
||||
ui::Layer* DelegatedFrameHostGetLayer() const override;
|
||||
bool DelegatedFrameHostIsVisible() const override;
|
||||
SkColor DelegatedFrameHostGetGutterColor(SkColor color) const override;
|
||||
gfx::Size DelegatedFrameHostDesiredSizeInDIP() const override;
|
||||
bool DelegatedFrameCanCreateResizeLock() const override;
|
||||
std::unique_ptr<content::ResizeLock> DelegatedFrameHostCreateResizeLock(
|
||||
@@ -218,6 +219,7 @@ class CefRenderWidgetHostViewOSR
|
||||
void DelegatedFrameHostUpdateVSyncParameters(
|
||||
const base::TimeTicks& timebase,
|
||||
const base::TimeDelta& interval) override;
|
||||
void SetBeginFrameSource(cc::BeginFrameSource* source) override;
|
||||
|
||||
bool InstallTransparency();
|
||||
|
||||
|
@@ -30,6 +30,13 @@ CefTextInputClientOSRMac* GetInputClientFromContext(
|
||||
|
||||
} // namespace
|
||||
|
||||
ui::AcceleratedWidgetMac* CefRenderWidgetHostViewOSR::GetAcceleratedWidgetMac()
|
||||
const {
|
||||
if (browser_compositor_)
|
||||
return browser_compositor_->accelerated_widget_mac();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::SetActive(bool active) {
|
||||
}
|
||||
|
||||
@@ -50,8 +57,8 @@ bool CefRenderWidgetHostViewOSR::IsSpeaking() const {
|
||||
void CefRenderWidgetHostViewOSR::StopSpeaking() {
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::UpdateInputMethodIfNecessary(
|
||||
bool text_input_state_changed) {
|
||||
void CefRenderWidgetHostViewOSR::TextInputStateChanged(
|
||||
const content::TextInputState& params) {
|
||||
[NSApp updateWindows];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user