Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / content / renderer / render_widget.h
index 783e8f4..0813df5 100644 (file)
@@ -16,7 +16,6 @@
 #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"
@@ -34,6 +33,7 @@
 #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"
@@ -56,7 +56,6 @@ class WebInputEvent;
 class WebKeyboardEvent;
 class WebMouseEvent;
 class WebTouchEvent;
-struct WebRenderingStatsImpl;
 }
 
 namespace cc { class OutputSurface; }
@@ -73,7 +72,6 @@ class RenderWidgetCompositor;
 class RenderWidgetTest;
 class ResizingModeSelector;
 struct ContextMenuParams;
-struct GpuRenderingStats;
 struct WebPluginGeometry;
 
 // RenderWidget provides a communication bridge between a WebWidget and
@@ -167,18 +165,6 @@ class CONTENT_EXPORT RenderWidget
   // 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);
@@ -248,6 +234,7 @@ class CONTENT_EXPORT RenderWidget
   // 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
@@ -259,6 +246,12 @@ class CONTENT_EXPORT RenderWidget
   // 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.
@@ -336,7 +329,6 @@ class CONTENT_EXPORT RenderWidget
       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,
@@ -368,10 +360,6 @@ class CONTENT_EXPORT RenderWidget
   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);
@@ -394,7 +382,6 @@ class CONTENT_EXPORT RenderWidget
   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
@@ -519,12 +506,6 @@ class CONTENT_EXPORT RenderWidget
   // 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
@@ -772,10 +753,6 @@ class CONTENT_EXPORT RenderWidget
   // 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_;
@@ -803,6 +780,9 @@ class CONTENT_EXPORT RenderWidget
   // 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);
 };