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

Side by Side Diff: ui/views/widget/hwnd_message_handler_delegate.h

Issue 10828398: Revert 152388 - Revert 152374 - Move more message handlers from NativeWidgetWin to HWNDMessageHandl… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/widget/hwnd_message_handler.cc ('k') | ui/views/widget/native_widget_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_WIDGET_HWND_MESSAGE_HANDLER_DELEGATE_H_ 5 #ifndef UI_VIEWS_WIDGET_HWND_MESSAGE_HANDLER_DELEGATE_H_
6 #define UI_VIEWS_WIDGET_HWND_MESSAGE_HANDLER_DELEGATE_H_ 6 #define UI_VIEWS_WIDGET_HWND_MESSAGE_HANDLER_DELEGATE_H_
7 7
8 #include "ui/views/views_export.h" 8 #include "ui/views/views_export.h"
9 9
10 namespace gfx {
11 class Path;
12 class Point;
13 class Size;
14 }
15
10 namespace views { 16 namespace views {
11 17
12 class InputMethod; 18 class InputMethod;
13 class NativeWidgetWin; 19 class NativeWidgetWin;
14 20
15 // Implemented by the object that uses the HWNDMessageHandler to handle 21 // Implemented by the object that uses the HWNDMessageHandler to handle
16 // notifications from the underlying HWND and service requests for data. 22 // notifications from the underlying HWND and service requests for data.
17 class VIEWS_EXPORT HWNDMessageHandlerDelegate { 23 class VIEWS_EXPORT HWNDMessageHandlerDelegate {
18 public: 24 public:
19 virtual bool IsWidgetWindow() const = 0; 25 virtual bool IsWidgetWindow() const = 0;
20 26
21 // TODO(beng): resolve this more satisfactorily vis-a-vis ShouldUseNativeFrame 27 // TODO(beng): resolve this more satisfactorily vis-a-vis ShouldUseNativeFrame
22 // to avoid confusion. 28 // to avoid confusion.
23 virtual bool IsUsingCustomFrame() const = 0; 29 virtual bool IsUsingCustomFrame() const = 0;
24 30
31 virtual bool CanResize() const = 0;
32 virtual bool CanMaximize() const = 0;
33 virtual bool CanActivate() const = 0;
34
35 virtual int GetNonClientComponent(const gfx::Point& point) const = 0;
36 virtual void GetWindowMask(const gfx::Size& size, gfx::Path* mask) = 0;
37
25 virtual InputMethod* GetInputMethod() = 0; 38 virtual InputMethod* GetInputMethod() = 0;
26 39
27 // TODO(beng): Investigate migrating these methods to On* prefixes once 40 // TODO(beng): Investigate migrating these methods to On* prefixes once
28 // HWNDMessageHandler is the WindowImpl. 41 // HWNDMessageHandler is the WindowImpl.
29 42
30 // Called when another app was activated. 43 // Called when another app was activated.
31 virtual void HandleAppDeactivated() = 0; 44 virtual void HandleAppDeactivated() = 0;
32 45
33 // Called when a well known "app command" from the system was performed. 46 // Called when a well known "app command" from the system was performed.
34 // Returns true if the command was handled. 47 // Returns true if the command was handled.
(...skipping 19 matching lines...) Expand all
54 virtual void HandleGlassModeChange() = 0; 67 virtual void HandleGlassModeChange() = 0;
55 68
56 // Called when the user begins or ends a size/move operation using the window 69 // Called when the user begins or ends a size/move operation using the window
57 // manager. 70 // manager.
58 virtual void HandleBeginWMSizeMove() = 0; 71 virtual void HandleBeginWMSizeMove() = 0;
59 virtual void HandleEndWMSizeMove() = 0; 72 virtual void HandleEndWMSizeMove() = 0;
60 73
61 // Called when the window's position changed. 74 // Called when the window's position changed.
62 virtual void HandleMove() = 0; 75 virtual void HandleMove() = 0;
63 76
77 // Called when focus shifted to this HWND from |last_focused_window|.
78 virtual void HandleNativeFocus(HWND last_focused_window) = 0;
79
80 // Called when focus shifted from the HWND to a different window.
81 virtual void HandleNativeBlur(HWND focused_window) = 0;
82
64 // This is provided for methods that need to call private methods on NWW. 83 // This is provided for methods that need to call private methods on NWW.
65 // TODO(beng): should be removed once HWNDMessageHandler is the WindowImpl. 84 // TODO(beng): should be removed once HWNDMessageHandler is the WindowImpl.
66 virtual NativeWidgetWin* AsNativeWidgetWin() = 0; 85 virtual NativeWidgetWin* AsNativeWidgetWin() = 0;
67 86
68 protected: 87 protected:
69 virtual ~HWNDMessageHandlerDelegate() {} 88 virtual ~HWNDMessageHandlerDelegate() {}
70 }; 89 };
71 90
72 } // namespace views 91 } // namespace views
73 92
74 #endif // UI_VIEWS_WIDGET_HWND_MESSAGE_HANDLER_DELEGATE_H_ 93 #endif // UI_VIEWS_WIDGET_HWND_MESSAGE_HANDLER_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/views/widget/hwnd_message_handler.cc ('k') | ui/views/widget/native_widget_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698