Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / ui / aura / window.h
index 2324533..4f597eb 100644 (file)
@@ -73,7 +73,7 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
   typedef std::vector<Window*> Windows;
 
   explicit Window(WindowDelegate* delegate);
-  virtual ~Window();
+  ~Window() override;
 
   // Initializes the window. This creates the window's layer.
   void Init(WindowLayerType layer_type);
@@ -96,7 +96,7 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
   void SetName(const std::string& name);
 
   const base::string16 title() const { return title_; }
-  void set_title(const base::string16& title) { title_ = title; }
+  void SetTitle(const base::string16& title);
 
   bool transparent() const { return transparent_; }
   void SetTransparent(bool transparent);
@@ -116,8 +116,8 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
   // defined as the Window that has a dispatcher. These functions return NULL if
   // the Window is contained in a hierarchy that does not have a dispatcher at
   // its root.
-  virtual Window* GetRootWindow();
-  virtual const Window* GetRootWindow() const;
+  Window* GetRootWindow();
+  const Window* GetRootWindow() const;
 
   WindowTreeHost* GetHost();
   const WindowTreeHost* GetHost() const;
@@ -147,7 +147,7 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
   // |aura::client::ScreenPositionClient| interface.
   gfx::Rect GetBoundsInScreen() const;
 
-  virtual void SetTransform(const gfx::Transform& transform);
+  void SetTransform(const gfx::Transform& transform);
 
   // Assigns a LayoutManager to size and place child windows.
   // The Window takes ownership of the LayoutManager.
@@ -215,17 +215,11 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
                                   gfx::Rect* rect);
 
   // Moves the cursor to the specified location relative to the window.
-  virtual void MoveCursorTo(const gfx::Point& point_in_window);
+  void MoveCursorTo(const gfx::Point& point_in_window);
 
   // Returns the cursor for the specified point, in window coordinates.
   gfx::NativeCursor GetCursor(const gfx::Point& point) const;
 
-  // Sets an 'event filter' for the window. An 'event filter' for a Window is
-  // a pre-target event handler, where the window owns the handler. A window
-  // can have only one such event filter. Setting a new filter removes and
-  // destroys any previously installed filter.
-  void SetEventFilter(ui::EventHandler* event_filter);
-
   // Add/remove observer.
   void AddObserver(WindowObserver* observer);
   void RemoveObserver(WindowObserver* observer);
@@ -272,10 +266,10 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
   bool HasFocus() const;
 
   // Returns true if the Window can be focused.
-  virtual bool CanFocus() const;
+  bool CanFocus() const;
 
   // Returns true if the Window can receive events.
-  virtual bool CanReceiveEvents() const;
+  bool CanReceiveEvents() const;
 
   // Does a capture on the window. This does nothing if the window isn't showing
   // (VISIBILITY_SHOWN) or isn't contained in a valid window hierarchy.
@@ -318,7 +312,7 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
   typedef void (*PropertyDeallocator)(int64 value);
 
   // Overridden from ui::LayerDelegate:
-  virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
+  void OnDeviceScaleFactorChanged(float device_scale_factor) override;
 
 #if !defined(NDEBUG)
   // These methods are useful when debugging.
@@ -326,6 +320,9 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
   void PrintWindowHierarchy(int depth) const;
 #endif
 
+  // Returns true if there was state needing to be cleaned up.
+  bool CleanupGestureState();
+
  protected:
   // Deletes (or removes if not owned by parent) all child windows. Intended for
   // use from the destructor.
@@ -448,29 +445,31 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
   // Notifies this window and its parent hierarchy.
   void NotifyWindowVisibilityChangedUp(aura::Window* target, bool visible);
 
+  // Notifies this window and its child hierarchy of a transform applied to
+  // |source|.
+  void NotifyAncestorWindowTransformed(Window* source);
+
   // Invoked when the bounds of the window changes. This may be invoked directly
   // by us, or from the closure returned by PrepareForLayerBoundsChange() after
   // the bounds of the layer has changed. |old_bounds| is the previous bounds.
   void OnWindowBoundsChanged(const gfx::Rect& old_bounds);
 
   // Overridden from ui::LayerDelegate:
-  virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE;
-  virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE;
+  void OnPaintLayer(gfx::Canvas* canvas) override;
+  void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override;
+  base::Closure PrepareForLayerBoundsChange() override;
 
   // Overridden from ui::EventTarget:
-  virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE;
-  virtual EventTarget* GetParentTarget() OVERRIDE;
-  virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const OVERRIDE;
-  virtual ui::EventTargeter* GetEventTargeter() OVERRIDE;
-  virtual void ConvertEventToTarget(ui::EventTarget* target,
-                                    ui::LocatedEvent* event) OVERRIDE;
+  bool CanAcceptEvent(const ui::Event& event) override;
+  EventTarget* GetParentTarget() override;
+  scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override;
+  ui::EventTargeter* GetEventTargeter() override;
+  void ConvertEventToTarget(ui::EventTarget* target,
+                            ui::LocatedEvent* event) override;
 
   // Updates the layer name based on the window's name and id.
   void UpdateLayerName();
 
-  // Returns true if the mouse is currently within our bounds.
-  bool ContainsMouse();
-
   // Returns the first ancestor (starting at |this|) with a layer. |offset| is
   // set to the offset from |this| to the first ancestor with a layer. |offset|
   // may be NULL.
@@ -515,7 +514,6 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
   // Whether layer is initialized as non-opaque.
   bool transparent_;
 
-  scoped_ptr<ui::EventHandler> event_filter_;
   scoped_ptr<LayoutManager> layout_manager_;
   scoped_ptr<ui::EventTargeter> targeter_;