Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Unified Diff: ui/aura/window_delegate.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/window.cc ('k') | ui/aura/window_event_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_delegate.h
diff --git a/ui/aura/window_delegate.h b/ui/aura/window_delegate.h
deleted file mode 100644
index 90e978a39c2e103900cb07dc9c04d2a536fec7da..0000000000000000000000000000000000000000
--- a/ui/aura/window_delegate.h
+++ /dev/null
@@ -1,109 +0,0 @@
-// 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.
-
-#ifndef UI_AURA_WINDOW_DELEGATE_H_
-#define UI_AURA_WINDOW_DELEGATE_H_
-
-#include "base/compiler_specific.h"
-#include "base/memory/ref_counted.h"
-#include "ui/aura/aura_export.h"
-#include "ui/events/event_constants.h"
-#include "ui/events/event_handler.h"
-#include "ui/gfx/native_widget_types.h"
-
-namespace gfx {
-class Canvas;
-class Path;
-class Point;
-class Rect;
-class Size;
-}
-
-namespace ui {
-class GestureEvent;
-class KeyEvent;
-class Layer;
-class MouseEvent;
-class Texture;
-class TouchEvent;
-}
-
-namespace aura {
-
-// Delegate interface for aura::Window.
-class AURA_EXPORT WindowDelegate : public ui::EventHandler {
- public:
- // Returns the window's minimum size, or size 0,0 if there is no limit.
- virtual gfx::Size GetMinimumSize() const = 0;
-
- // Returns the window's maximum size, or size 0,0 if there is no limit.
- virtual gfx::Size GetMaximumSize() const = 0;
-
- // Called when the Window's position and/or size changes.
- virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) = 0;
-
- // Returns the native cursor for the specified point, in window coordinates,
- // or NULL for the default cursor.
- virtual gfx::NativeCursor GetCursor(const gfx::Point& point) = 0;
-
- // Returns the non-client component (see hit_test.h) containing |point|, in
- // window coordinates.
- virtual int GetNonClientComponent(const gfx::Point& point) const = 0;
-
- // Returns true if event handling should descend into |child|. |location| is
- // in terms of the Window.
- virtual bool ShouldDescendIntoChildForEventHandling(
- Window* child,
- const gfx::Point& location) = 0;
-
- // Returns true of the window can be focused.
- virtual bool CanFocus() = 0;
-
- // Invoked when mouse capture is lost on the window.
- virtual void OnCaptureLost() = 0;
-
- // Asks the delegate to paint window contents into the supplied canvas.
- virtual void OnPaint(gfx::Canvas* canvas) = 0;
-
- // Called when the window's device scale factor has changed.
- virtual void OnDeviceScaleFactorChanged(float device_scale_factor) = 0;
-
- // Called from Window's destructor before OnWindowDestroyed and before the
- // children have been destroyed and the window has been removed from its
- // parent.
- // This method takes the window because the delegate implementation may no
- // longer have a route back to the window by the time this method is called.
- virtual void OnWindowDestroying(Window* window) = 0;
-
- // Called when the Window has been destroyed (i.e. from its destructor). This
- // is called after OnWindowDestroying and after the children have been
- // deleted and the window has been removed from its parent.
- // The delegate can use this as an opportunity to delete itself if necessary.
- // This method takes the window because the delegate implementation may no
- // longer have a route back to the window by the time this method is called.
- virtual void OnWindowDestroyed(Window* window) = 0;
-
- // Called when the TargetVisibility() of a Window changes. |visible|
- // corresponds to the target visibility of the window. See
- // Window::TargetVisibility() for details.
- virtual void OnWindowTargetVisibilityChanged(bool visible) = 0;
-
- // Called from Window::HitTest to check if the window has a custom hit test
- // mask. It works similar to the views counterparts. That is, if the function
- // returns true, GetHitTestMask below will be called to get the mask.
- // Otherwise, Window will hit-test against its bounds.
- virtual bool HasHitTestMask() const = 0;
-
- // Called from Window::HitTest to retrieve hit test mask when HasHitTestMask
- // above returns true.
- virtual void GetHitTestMask(gfx::Path* mask) const = 0;
-
- protected:
- virtual ~WindowDelegate() {}
-};
-
-} // namespace aura
-
-#endif // UI_AURA_WINDOW_DELEGATE_H_
« no previous file with comments | « ui/aura/window.cc ('k') | ui/aura/window_event_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698