#include "base/time/time.h"
#include "base/timer/timer.h"
#include "cc/debug/rendering_stats_instrumentation.h"
-#include "content/common/browser_rendering_stats.h"
#include "content/common/content_export.h"
#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
#include "content/common/input/synthetic_gesture_params.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/ime/text_input_mode.h"
#include "ui/base/ime/text_input_type.h"
+#include "ui/base/ui_base_types.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/range/range.h"
#include "ui/gfx/rect.h"
class WebKeyboardEvent;
class WebMouseEvent;
class WebTouchEvent;
-struct WebRenderingStatsImpl;
}
namespace cc { class OutputSurface; }
class RenderWidgetTest;
class ResizingModeSelector;
struct ContextMenuParams;
-struct GpuRenderingStats;
struct WebPluginGeometry;
// RenderWidget provides a communication bridge between a WebWidget and
// pending moves don't try to reference it.
void CleanupWindowInPluginMoves(gfx::PluginWindowHandle window);
- // Fills in a WebRenderingStatsImpl struct containing information about
- // rendering, e.g. count of frames rendered, time spent painting.
- void GetRenderingStats(blink::WebRenderingStatsImpl&) const;
-
- // Fills in a GpuRenderingStats struct containing information about
- // GPU rendering, e.g. count of texture uploads performed, time spent
- // uploading.
- // This call is relatively expensive as it blocks on the GPU process
- bool GetGpuRenderingStats(GpuRenderingStats*) const;
-
- void GetBrowserRenderingStats(BrowserRenderingStats* stats);
-
RenderWidgetCompositor* compositor() const;
virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback);
// the new value will be sent to the browser process.
void UpdateSelectionBounds();
+ void OnShowHostContextMenu(ContextMenuParams* params);
#if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA)
// Checks if the composition range or composition character bounds have been
// Temporary for debugging purposes...
bool closing() const { return closing_; }
+ ui::MenuSourceType context_menu_source_type() {
+ return context_menu_source_type_; }
+ gfx::Point touch_editing_context_menu_location() {
+ return touch_editing_context_menu_location_;
+ }
+
protected:
// Friend RefCounted so that the dtor can be non-public. Using this class
// without ref-counting is an error.
float root_layer_scale);
void SetExternalPopupOriginAdjustmentsForEmulation(
ExternalPopupMenu* popup, ScreenMetricsEmulator* emulator);
- virtual void OnShowHostContextMenu(ContextMenuParams* params);
// RenderWidget IPC message handlers
void OnHandleInputEvent(const blink::WebInputEvent* event,
virtual void OnImeConfirmComposition(const base::string16& text,
const gfx::Range& replacement_range,
bool keep_selection);
- void OnPaintAtSize(const TransportDIB::Handle& dib_id,
- int tag,
- const gfx::Size& page_size,
- const gfx::Size& desired_size);
void OnRepaint(gfx::Size size_to_paint);
void OnSyntheticGestureCompleted();
void OnSetTextDirection(blink::WebTextDirection direction);
bool ShouldHandleImeEvent();
void OnSnapshot(const gfx::Rect& src_subrect);
- void OnSetBrowserRenderingStats(const BrowserRenderingStats& stats);
// Notify the compositor about a change in viewport size. This should be
// used only with auto resize mode WebWidgets, as normal WebWidgets should
// won't be sent to WebKit or trigger DidHandleMouseEvent().
virtual bool WillHandleMouseEvent(const blink::WebMouseEvent& event);
- // Called by OnHandleInputEvent() to notify subclasses that a key event is
- // about to be handled.
- // Returns true if no further handling is needed. In that case, the event
- // won't be sent to WebKit or trigger DidHandleKeyEvent().
- virtual bool WillHandleKeyEvent(const blink::WebKeyboardEvent& event);
-
// Called by OnHandleInputEvent() to notify subclasses that a gesture event is
// about to be handled.
// Returns true if no further handling is needed. In that case, the event
// Specified whether the compositor will run in its own thread.
bool is_threaded_compositing_enabled_;
- // The last set of rendering stats received from the browser. This is only
- // received when using the --enable-gpu-benchmarking flag.
- BrowserRenderingStats browser_rendering_stats_;
-
// The latency information for any current non-accelerated-compositing
// frame.
std::vector<ui::LatencyInfo> latency_info_;
// of compositing-related events (e.g. DidCommitCompositorFrame).
ObserverList<RenderFrameImpl> swapped_out_frames_;
+ ui::MenuSourceType context_menu_source_type_;
+ gfx::Point touch_editing_context_menu_location_;
+
DISALLOW_COPY_AND_ASSIGN(RenderWidget);
};