2014-07-01 00:30:29 +02:00
|
|
|
// Copyright (c) 2014 The Chromium Embedded Framework Authors.
|
|
|
|
// Portions copyright (c) 2012 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.
|
|
|
|
|
2015-11-17 19:20:13 +01:00
|
|
|
#ifndef CEF_LIBCEF_BROWSER_OSR_RENDER_WIDGET_HOST_VIEW_OSR_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_OSR_RENDER_WIDGET_HOST_VIEW_OSR_H_
|
2014-07-01 00:30:29 +02:00
|
|
|
#pragma once
|
|
|
|
|
2015-08-17 21:48:57 +02:00
|
|
|
#include <set>
|
2014-07-01 00:30:29 +02:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "include/cef_base.h"
|
|
|
|
#include "include/cef_browser.h"
|
|
|
|
|
|
|
|
#include "base/memory/weak_ptr.h"
|
2016-01-06 20:20:54 +01:00
|
|
|
#include "build/build_config.h"
|
2016-04-27 22:38:52 +02:00
|
|
|
#include "content/browser/renderer_host/delegated_frame_host.h"
|
2014-07-01 00:30:29 +02:00
|
|
|
#include "content/browser/renderer_host/render_widget_host_view_base.h"
|
|
|
|
#include "ui/compositor/compositor.h"
|
|
|
|
|
2015-11-17 19:20:13 +01:00
|
|
|
#if defined(OS_LINUX)
|
|
|
|
#include "ui/base/x/x11_util.h"
|
|
|
|
#endif
|
|
|
|
|
2014-09-04 19:53:40 +02:00
|
|
|
#if defined(OS_MACOSX)
|
2016-04-27 22:38:52 +02:00
|
|
|
#include "content/browser/renderer_host/browser_compositor_view_mac.h"
|
2014-09-04 19:53:40 +02:00
|
|
|
#endif
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
#if defined(OS_WIN)
|
|
|
|
#include "ui/gfx/win/window_impl.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
namespace content {
|
|
|
|
class RenderWidgetHost;
|
|
|
|
class RenderWidgetHostImpl;
|
|
|
|
class BackingStore;
|
|
|
|
}
|
|
|
|
|
2015-01-01 17:51:56 +01:00
|
|
|
class CefBeginFrameTimer;
|
2014-07-01 00:30:29 +02:00
|
|
|
class CefBrowserHostImpl;
|
2015-01-01 17:51:56 +01:00
|
|
|
class CefCopyFrameGenerator;
|
|
|
|
class CefSoftwareOutputDeviceOSR;
|
2014-07-01 00:30:29 +02:00
|
|
|
class CefWebContentsViewOSR;
|
|
|
|
|
|
|
|
#if defined(OS_MACOSX)
|
|
|
|
#ifdef __OBJC__
|
2014-09-04 19:53:40 +02:00
|
|
|
@class CALayer;
|
2014-07-01 00:30:29 +02:00
|
|
|
@class NSWindow;
|
|
|
|
#else
|
2014-09-04 19:53:40 +02:00
|
|
|
class CALayer;
|
2014-07-01 00:30:29 +02:00
|
|
|
class NSWindow;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(USE_X11)
|
|
|
|
class CefWindowX11;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// CefRenderWidgetHostViewOSR
|
|
|
|
//
|
|
|
|
// An object representing the "View" of a rendered web page. This object is
|
|
|
|
// responsible for sending paint events to the the CefRenderHandler
|
|
|
|
// when window rendering is disabled. It is the implementation of the
|
|
|
|
// RenderWidgetHostView that the cross-platform RenderWidgetHost object uses
|
|
|
|
// to display the data.
|
|
|
|
//
|
|
|
|
// Comment excerpted from render_widget_host.h:
|
|
|
|
//
|
|
|
|
// "The lifetime of the RenderWidgetHostView is tied to the render process.
|
|
|
|
// If the render process dies, the RenderWidgetHostView goes away and all
|
|
|
|
// references to it must become NULL."
|
|
|
|
//
|
|
|
|
// RenderWidgetHostView class hierarchy described in render_widget_host_view.h.
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2014-09-04 19:53:40 +02:00
|
|
|
#if defined(OS_MACOSX)
|
2016-06-21 00:59:23 +02:00
|
|
|
class AcceleratedWidgetMacNSViewHelper;
|
2014-09-04 19:53:40 +02:00
|
|
|
#endif
|
2016-06-21 00:59:23 +02:00
|
|
|
|
|
|
|
class CefRenderWidgetHostViewOSR
|
|
|
|
: public content::RenderWidgetHostViewBase,
|
2015-01-01 17:51:56 +01:00
|
|
|
public ui::CompositorDelegate,
|
2014-07-01 00:30:29 +02:00
|
|
|
public content::DelegatedFrameHostClient {
|
|
|
|
public:
|
2015-11-17 19:20:13 +01:00
|
|
|
CefRenderWidgetHostViewOSR(const bool transparent,
|
|
|
|
content::RenderWidgetHost* widget,
|
2015-06-11 17:00:05 +02:00
|
|
|
CefRenderWidgetHostViewOSR* parent_host_view);
|
2014-11-12 20:25:15 +01:00
|
|
|
~CefRenderWidgetHostViewOSR() override;
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// RenderWidgetHostView implementation.
|
2014-11-12 20:25:15 +01:00
|
|
|
void InitAsChild(gfx::NativeView parent_view) override;
|
|
|
|
content::RenderWidgetHost* GetRenderWidgetHost() const override;
|
|
|
|
void SetSize(const gfx::Size& size) override;
|
|
|
|
void SetBounds(const gfx::Rect& rect) override;
|
|
|
|
gfx::Vector2dF GetLastScrollOffset() const override;
|
|
|
|
gfx::NativeView GetNativeView() const override;
|
|
|
|
gfx::NativeViewAccessible GetNativeViewAccessible() override;
|
|
|
|
ui::TextInputClient* GetTextInputClient() override;
|
|
|
|
void Focus() override;
|
|
|
|
bool HasFocus() const override;
|
|
|
|
bool IsSurfaceAvailableForCopy() const override;
|
|
|
|
void Show() override;
|
|
|
|
void Hide() override;
|
|
|
|
bool IsShowing() override;
|
|
|
|
gfx::Rect GetViewBounds() const override;
|
|
|
|
void SetBackgroundColor(SkColor color) override;
|
|
|
|
bool LockMouse() override;
|
|
|
|
void UnlockMouse() override;
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
#if defined(OS_MACOSX)
|
2016-05-25 01:35:43 +02:00
|
|
|
ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac() const override;
|
2014-11-12 20:25:15 +01:00
|
|
|
void SetActive(bool active) override;
|
|
|
|
void ShowDefinitionForSelection() override;
|
|
|
|
bool SupportsSpeech() const override;
|
|
|
|
void SpeakSelection() override;
|
|
|
|
bool IsSpeaking() const override;
|
|
|
|
void StopSpeaking() override;
|
2014-07-01 00:30:29 +02:00
|
|
|
#endif // defined(OS_MACOSX)
|
|
|
|
|
|
|
|
// RenderWidgetHostViewBase implementation.
|
2016-07-06 21:34:09 +02:00
|
|
|
void OnSwapCompositorFrame(uint32_t output_surface_id,
|
|
|
|
cc::CompositorFrame frame) override;
|
2015-10-09 17:23:12 +02:00
|
|
|
void ClearCompositorFrame() override;
|
2014-11-12 20:25:15 +01:00
|
|
|
void InitAsPopup(content::RenderWidgetHostView* parent_host_view,
|
|
|
|
const gfx::Rect& pos) override;
|
|
|
|
void InitAsFullscreen(
|
|
|
|
content::RenderWidgetHostView* reference_host_view) override;
|
|
|
|
void UpdateCursor(const content::WebCursor& cursor) override;
|
|
|
|
void SetIsLoading(bool is_loading) override;
|
2016-05-25 01:35:43 +02:00
|
|
|
void TextInputStateChanged(const content::TextInputState& params) override;
|
2014-11-12 20:25:15 +01:00
|
|
|
void ImeCancelComposition() override;
|
|
|
|
void RenderProcessGone(base::TerminationStatus status,
|
|
|
|
int error_code) override;
|
|
|
|
void Destroy() override;
|
|
|
|
void SetTooltipText(const base::string16& tooltip_text) override;
|
2015-10-09 17:23:12 +02:00
|
|
|
|
|
|
|
#if defined(OS_MACOSX)
|
2014-11-12 20:25:15 +01:00
|
|
|
void SelectionChanged(const base::string16& text,
|
|
|
|
size_t offset,
|
|
|
|
const gfx::Range& range) override;
|
2015-10-09 17:23:12 +02:00
|
|
|
#endif
|
|
|
|
|
2014-11-12 20:25:15 +01:00
|
|
|
gfx::Size GetRequestedRendererSize() const override;
|
|
|
|
gfx::Size GetPhysicalBackingSize() const override;
|
|
|
|
void SelectionBoundsChanged(
|
|
|
|
const ViewHostMsg_SelectionBounds_Params& params) override;
|
|
|
|
void CopyFromCompositingSurface(
|
2014-07-01 00:30:29 +02:00
|
|
|
const gfx::Rect& src_subrect,
|
|
|
|
const gfx::Size& dst_size,
|
2015-10-09 17:23:12 +02:00
|
|
|
const content::ReadbackRequestCallback& callback,
|
2014-11-12 20:25:15 +01:00
|
|
|
const SkColorType color_type) override;
|
|
|
|
void CopyFromCompositingSurfaceToVideoFrame(
|
2014-07-01 00:30:29 +02:00
|
|
|
const gfx::Rect& src_subrect,
|
|
|
|
const scoped_refptr<media::VideoFrame>& target,
|
2015-12-09 17:10:16 +01:00
|
|
|
const base::Callback<void(const gfx::Rect&, bool)>& callback) override;
|
2014-11-12 20:25:15 +01:00
|
|
|
bool CanCopyToVideoFrame() const override;
|
|
|
|
void BeginFrameSubscription(
|
2016-04-27 22:38:52 +02:00
|
|
|
std::unique_ptr<content::RenderWidgetHostViewFrameSubscriber> subscriber)
|
2014-11-12 20:25:15 +01:00
|
|
|
override;
|
|
|
|
void EndFrameSubscription() override;
|
|
|
|
bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
|
|
|
|
void GetScreenInfo(blink::WebScreenInfo* results) override;
|
|
|
|
gfx::Rect GetBoundsInRootWindow() override;
|
|
|
|
content::BrowserAccessibilityManager*
|
2014-09-04 19:53:40 +02:00
|
|
|
CreateBrowserAccessibilityManager(
|
2016-04-27 22:38:52 +02:00
|
|
|
content::BrowserAccessibilityDelegate* delegate,
|
|
|
|
bool for_root_frame) override;
|
2015-11-10 21:18:16 +01:00
|
|
|
void LockCompositingSurface() override;
|
|
|
|
void UnlockCompositingSurface() override;
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2014-10-10 19:54:35 +02:00
|
|
|
#if defined(TOOLKIT_VIEWS) || defined(USE_AURA)
|
2014-11-12 20:25:15 +01:00
|
|
|
void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
|
|
|
|
const SkBitmap& zoomed_bitmap) override;
|
2014-10-10 19:54:35 +02:00
|
|
|
#endif
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
#if defined(OS_MACOSX) || defined(USE_AURA)
|
2014-11-12 20:25:15 +01:00
|
|
|
void ImeCompositionRangeChanged(
|
2014-07-01 00:30:29 +02:00
|
|
|
const gfx::Range& range,
|
2014-11-12 20:25:15 +01:00
|
|
|
const std::vector<gfx::Rect>& character_bounds) override;
|
2014-07-01 00:30:29 +02:00
|
|
|
#endif
|
|
|
|
|
2015-01-01 17:51:56 +01:00
|
|
|
bool OnMessageReceived(const IPC::Message& msg) override;
|
|
|
|
|
|
|
|
// Message handlers.
|
|
|
|
void OnSetNeedsBeginFrames(bool enabled);
|
|
|
|
|
|
|
|
// ui::CompositorDelegate implementation.
|
2016-04-27 22:38:52 +02:00
|
|
|
std::unique_ptr<cc::SoftwareOutputDevice> CreateSoftwareOutputDevice(
|
2015-01-01 17:51:56 +01:00
|
|
|
ui::Compositor* compositor) override;
|
|
|
|
|
2014-09-04 19:53:40 +02:00
|
|
|
// DelegatedFrameHostClient implementation.
|
2016-06-21 00:59:23 +02:00
|
|
|
virtual int DelegatedFrameHostGetGpuMemoryBufferClientId() const override;
|
2015-02-04 19:10:14 +01:00
|
|
|
ui::Layer* DelegatedFrameHostGetLayer() const override;
|
|
|
|
bool DelegatedFrameHostIsVisible() const override;
|
2016-05-25 01:35:43 +02:00
|
|
|
SkColor DelegatedFrameHostGetGutterColor(SkColor color) const override;
|
2015-02-04 19:10:14 +01:00
|
|
|
gfx::Size DelegatedFrameHostDesiredSizeInDIP() const override;
|
|
|
|
bool DelegatedFrameCanCreateResizeLock() const override;
|
2016-04-27 22:38:52 +02:00
|
|
|
std::unique_ptr<content::ResizeLock> DelegatedFrameHostCreateResizeLock(
|
2014-11-12 20:25:15 +01:00
|
|
|
bool defer_compositor_lock) override;
|
2015-02-04 19:10:14 +01:00
|
|
|
void DelegatedFrameHostResizeLockWasReleased() override;
|
|
|
|
void DelegatedFrameHostSendCompositorSwapAck(
|
|
|
|
int output_surface_id,
|
|
|
|
const cc::CompositorFrameAck& ack) override;
|
|
|
|
void DelegatedFrameHostSendReclaimCompositorResources(
|
|
|
|
int output_surface_id,
|
|
|
|
const cc::CompositorFrameAck& ack) override;
|
|
|
|
void DelegatedFrameHostOnLostCompositorResources() override;
|
|
|
|
void DelegatedFrameHostUpdateVSyncParameters(
|
|
|
|
const base::TimeTicks& timebase,
|
|
|
|
const base::TimeDelta& interval) override;
|
2016-05-25 01:35:43 +02:00
|
|
|
void SetBeginFrameSource(cc::BeginFrameSource* source) override;
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
bool InstallTransparency();
|
|
|
|
|
|
|
|
void WasResized();
|
|
|
|
void OnScreenInfoChanged();
|
|
|
|
void Invalidate(CefBrowserHost::PaintElementType type);
|
|
|
|
void SendKeyEvent(const content::NativeWebKeyboardEvent& event);
|
|
|
|
void SendMouseEvent(const blink::WebMouseEvent& event);
|
|
|
|
void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event);
|
|
|
|
void SendFocusEvent(bool focus);
|
2015-05-13 17:43:50 +02:00
|
|
|
void UpdateFrameRate();
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
void HoldResize();
|
|
|
|
void ReleaseResize();
|
|
|
|
|
2015-01-01 17:51:56 +01:00
|
|
|
void OnPaint(const gfx::Rect& damage_rect,
|
|
|
|
int bitmap_width,
|
|
|
|
int bitmap_height,
|
|
|
|
void* bitmap_pixels);
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
bool IsPopupWidget() const {
|
|
|
|
return popup_type_ != blink::WebPopupTypeNone;
|
|
|
|
}
|
|
|
|
|
|
|
|
#if defined(OS_MACOSX)
|
|
|
|
NSTextInputContext* GetNSTextInputContext();
|
|
|
|
void HandleKeyEventBeforeTextInputClient(CefEventHandle keyEvent);
|
|
|
|
void HandleKeyEventAfterTextInputClient(CefEventHandle keyEvent);
|
|
|
|
|
|
|
|
bool GetCachedFirstRectForCharacterRange(gfx::Range range, gfx::Rect* rect,
|
|
|
|
gfx::Range* actual_range) const;
|
2015-10-09 17:23:12 +02:00
|
|
|
|
|
|
|
const std::string& selected_text() const { return selected_text_; }
|
|
|
|
const gfx::Range& composition_range() const { return composition_range_; }
|
|
|
|
const base::string16& selection_text() const { return selection_text_; }
|
|
|
|
size_t selection_text_offset() const { return selection_text_offset_; }
|
2014-07-01 00:30:29 +02:00
|
|
|
#endif // defined(OS_MACOSX)
|
|
|
|
|
2015-08-17 21:48:57 +02:00
|
|
|
void AddGuestHostView(CefRenderWidgetHostViewOSR* guest_host);
|
|
|
|
void RemoveGuestHostView(CefRenderWidgetHostViewOSR* guest_host);
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
CefRefPtr<CefBrowserHostImpl> browser_impl() const { return browser_impl_; }
|
|
|
|
void set_browser_impl(CefRefPtr<CefBrowserHostImpl> browser) {
|
|
|
|
browser_impl_ = browser;
|
|
|
|
}
|
|
|
|
|
|
|
|
void set_popup_host_view(CefRenderWidgetHostViewOSR* popup_view) {
|
|
|
|
popup_host_view_ = popup_view;
|
|
|
|
}
|
2015-06-11 17:00:05 +02:00
|
|
|
void set_child_host_view(CefRenderWidgetHostViewOSR* popup_view) {
|
|
|
|
child_host_view_ = popup_view;
|
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2016-07-06 21:34:09 +02:00
|
|
|
ui::Compositor* GetCompositor() const;
|
2014-07-01 00:30:29 +02:00
|
|
|
content::RenderWidgetHostImpl* render_widget_host() const
|
|
|
|
{ return render_widget_host_; }
|
|
|
|
|
|
|
|
private:
|
2016-07-06 21:34:09 +02:00
|
|
|
content::DelegatedFrameHost* GetDelegatedFrameHost() const;
|
|
|
|
ui::Layer* GetRootLayer() const;
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
void SetFrameRate();
|
2015-01-01 17:51:56 +01:00
|
|
|
void SetDeviceScaleFactor();
|
2014-07-01 00:30:29 +02:00
|
|
|
void ResizeRootLayer();
|
|
|
|
|
2015-01-01 17:51:56 +01:00
|
|
|
// Called by CefBeginFrameTimer to send a BeginFrame request.
|
|
|
|
void OnBeginFrameTimerTick();
|
|
|
|
void SendBeginFrame(base::TimeTicks frame_time,
|
|
|
|
base::TimeDelta vsync_period);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2015-08-17 21:48:57 +02:00
|
|
|
void CancelWidget();
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2014-09-27 01:48:19 +02:00
|
|
|
void OnScrollOffsetChanged();
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
#if defined(OS_MACOSX)
|
2016-06-21 00:59:23 +02:00
|
|
|
friend class AcceleratedWidgetMacNSViewHelper;
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
// Returns composition character boundary rectangle. The |range| is
|
|
|
|
// composition based range. Also stores |actual_range| which is corresponding
|
|
|
|
// to actually used range for returned rectangle.
|
|
|
|
gfx::Rect GetFirstRectForCompositionRange(const gfx::Range& range,
|
|
|
|
gfx::Range* actual_range) const;
|
|
|
|
|
|
|
|
// Converts from given whole character range to composition oriented range. If
|
|
|
|
// the conversion failed, return gfx::Range::InvalidRange.
|
|
|
|
gfx::Range ConvertCharacterRangeToCompositionRange(
|
|
|
|
const gfx::Range& request_range) const;
|
|
|
|
|
|
|
|
// Returns true if there is line break in |range| and stores line breaking
|
|
|
|
// point to |line_breaking_point|. The |line_break_point| is valid only if
|
|
|
|
// this function returns true.
|
|
|
|
static bool GetLineBreakIndex(const std::vector<gfx::Rect>& bounds,
|
|
|
|
const gfx::Range& range,
|
|
|
|
size_t* line_break_point);
|
|
|
|
|
|
|
|
void DestroyNSTextInputOSR();
|
|
|
|
#endif // defined(OS_MACOSX)
|
|
|
|
|
|
|
|
void PlatformCreateCompositorWidget();
|
|
|
|
void PlatformDestroyCompositorWidget();
|
|
|
|
|
2015-11-17 19:20:13 +01:00
|
|
|
#if defined(USE_AURA)
|
|
|
|
ui::PlatformCursor GetPlatformCursor(blink::WebCursorInfo::Type type);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
const bool transparent_;
|
|
|
|
|
2015-01-01 17:51:56 +01:00
|
|
|
float scale_factor_;
|
|
|
|
int frame_rate_threshold_ms_;
|
|
|
|
|
2016-07-06 21:34:09 +02:00
|
|
|
#if !defined(OS_MACOSX)
|
2016-04-27 22:38:52 +02:00
|
|
|
std::unique_ptr<ui::Compositor> compositor_;
|
2014-07-01 00:30:29 +02:00
|
|
|
gfx::AcceleratedWidget compositor_widget_;
|
2016-07-06 21:34:09 +02:00
|
|
|
std::unique_ptr<content::DelegatedFrameHost> delegated_frame_host_;
|
2016-04-27 22:38:52 +02:00
|
|
|
std::unique_ptr<ui::Layer> root_layer_;
|
2016-07-06 21:34:09 +02:00
|
|
|
#endif
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
#if defined(OS_WIN)
|
2016-04-27 22:38:52 +02:00
|
|
|
std::unique_ptr<gfx::WindowImpl> window_;
|
2014-07-01 00:30:29 +02:00
|
|
|
#elif defined(OS_MACOSX)
|
|
|
|
NSWindow* window_;
|
2014-09-04 19:53:40 +02:00
|
|
|
CALayer* background_layer_;
|
2016-04-27 22:38:52 +02:00
|
|
|
std::unique_ptr<content::BrowserCompositorMac> browser_compositor_;
|
2016-06-21 00:59:23 +02:00
|
|
|
AcceleratedWidgetMacNSViewHelper* accelerated_widget_helper_;
|
2014-07-01 00:30:29 +02:00
|
|
|
#elif defined(USE_X11)
|
|
|
|
CefWindowX11* window_;
|
2016-04-27 22:38:52 +02:00
|
|
|
std::unique_ptr<ui::XScopedCursor> invisible_cursor_;
|
2014-07-01 00:30:29 +02:00
|
|
|
#endif
|
|
|
|
|
2015-01-01 17:51:56 +01:00
|
|
|
// Used to control the VSync rate in subprocesses when BeginFrame scheduling
|
|
|
|
// is enabled.
|
2016-04-27 22:38:52 +02:00
|
|
|
std::unique_ptr<CefBeginFrameTimer> begin_frame_timer_;
|
2015-01-01 17:51:56 +01:00
|
|
|
|
|
|
|
// Used for direct rendering from the compositor when GPU compositing is
|
|
|
|
// disabled. This object is owned by the compositor.
|
|
|
|
CefSoftwareOutputDeviceOSR* software_output_device_;
|
|
|
|
|
|
|
|
// Used for managing copy requests when GPU compositing is enabled.
|
2016-04-27 22:38:52 +02:00
|
|
|
std::unique_ptr<CefCopyFrameGenerator> copy_frame_generator_;
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
bool hold_resize_;
|
|
|
|
bool pending_resize_;
|
|
|
|
|
|
|
|
// The associated Model. While |this| is being Destroyed,
|
|
|
|
// |render_widget_host_| is NULL and the message loop is run one last time
|
|
|
|
// Message handlers must check for a NULL |render_widget_host_|.
|
|
|
|
content::RenderWidgetHostImpl* render_widget_host_;
|
2015-06-11 17:00:05 +02:00
|
|
|
|
|
|
|
bool has_parent_;
|
2014-07-01 00:30:29 +02:00
|
|
|
CefRenderWidgetHostViewOSR* parent_host_view_;
|
|
|
|
CefRenderWidgetHostViewOSR* popup_host_view_;
|
2015-06-11 17:00:05 +02:00
|
|
|
CefRenderWidgetHostViewOSR* child_host_view_;
|
2015-08-17 21:48:57 +02:00
|
|
|
std::set<CefRenderWidgetHostViewOSR*> guest_host_views_;
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
CefRefPtr<CefBrowserHostImpl> browser_impl_;
|
|
|
|
|
|
|
|
bool is_showing_;
|
|
|
|
bool is_destroyed_;
|
|
|
|
gfx::Rect popup_position_;
|
|
|
|
|
2014-09-27 01:48:19 +02:00
|
|
|
// The last scroll offset of the view.
|
|
|
|
gfx::Vector2dF last_scroll_offset_;
|
|
|
|
bool is_scroll_offset_changed_pending_;
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
#if defined(OS_MACOSX)
|
|
|
|
NSTextInputContext* text_input_context_osr_mac_;
|
2015-10-09 17:23:12 +02:00
|
|
|
|
|
|
|
// Selected text on the renderer.
|
|
|
|
std::string selected_text_;
|
|
|
|
|
|
|
|
// The current composition character range and its bounds.
|
|
|
|
gfx::Range composition_range_;
|
|
|
|
std::vector<gfx::Rect> composition_bounds_;
|
|
|
|
|
|
|
|
// The current caret bounds.
|
|
|
|
gfx::Rect caret_rect_;
|
|
|
|
|
|
|
|
// The current first selection bounds.
|
|
|
|
gfx::Rect first_selection_rect_;
|
2014-07-01 00:30:29 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
base::WeakPtrFactory<CefRenderWidgetHostViewOSR> weak_ptr_factory_;
|
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(CefRenderWidgetHostViewOSR);
|
|
|
|
};
|
|
|
|
|
2015-11-17 19:20:13 +01:00
|
|
|
#endif // CEF_LIBCEF_BROWSER_OSR_RENDER_WIDGET_HOST_VIEW_OSR_H_
|
2014-07-01 00:30:29 +02:00
|
|
|
|