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

Side by Side Diff: views/window/native_window_delegate.h

Issue 7054052: Move more from Window onto Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 | « views/window/native_window.h ('k') | views/window/native_window_gtk.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 VIEWS_WIDGET_NATIVE_WINDOW_DELEGATE_H_ 5 #ifndef VIEWS_WIDGET_NATIVE_WINDOW_DELEGATE_H_
6 #define VIEWS_WIDGET_NATIVE_WINDOW_DELEGATE_H_ 6 #define VIEWS_WIDGET_NATIVE_WINDOW_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 namespace ui { 9 namespace ui {
10 class ThemeProvider; 10 class ThemeProvider;
11 } 11 }
12 12
13 namespace views { 13 namespace views {
14 namespace internal { 14 namespace internal {
15 15
16 //////////////////////////////////////////////////////////////////////////////// 16 ////////////////////////////////////////////////////////////////////////////////
17 // NativeWindowDelegate interface 17 // NativeWindowDelegate interface
18 // 18 //
19 // An interface implemented by an object that receives notifications from a 19 // An interface implemented by an object that receives notifications from a
20 // NativeWindow implementation. 20 // NativeWindow implementation.
21 // 21 //
22 class NativeWindowDelegate { 22 class NativeWindowDelegate {
23 public: 23 public:
24 virtual ~NativeWindowDelegate() {} 24 virtual ~NativeWindowDelegate() {}
25 25
26 // Returns true if the window can be activated.
27 virtual bool CanActivate() const = 0;
28
29 virtual bool IsInactiveRenderingDisabled() const = 0;
30 virtual void EnableInactiveRendering() = 0;
31
32 // Returns true if the window is modal. 26 // Returns true if the window is modal.
33 virtual bool IsModal() const = 0; 27 virtual bool IsModal() const = 0;
34 28
35 // Returns true if the window is a dialog box. 29 // Returns true if the window is a dialog box.
36 virtual bool IsDialogBox() const = 0; 30 virtual bool IsDialogBox() const = 0;
37 31
38 // Returns the smallest size the window can be resized to by the user.
39 virtual gfx::Size GetMinimumSize() = 0;
40
41 // Returns the non-client component (see views/window/hit_test.h) containing
42 // |point|, in client coordinates.
43 virtual int GetNonClientComponent(const gfx::Point& point) = 0;
44
45 // Runs the specified native command. Returns true if the command is handled.
46 virtual bool ExecuteCommand(int command_id) = 0;
47
48 // Called just after the NativeWindow has been created. 32 // Called just after the NativeWindow has been created.
49 virtual void OnNativeWindowCreated(const gfx::Rect& bounds) = 0; 33 virtual void OnNativeWindowCreated(const gfx::Rect& bounds) = 0;
50 34
51 // Called when the activation state of a window has changed.
52 virtual void OnNativeWindowActivationChanged(bool active) = 0;
53
54 // Called when the user begins/ends to change the bounds of the window.
55 virtual void OnNativeWindowBeginUserBoundsChange() = 0;
56 virtual void OnNativeWindowEndUserBoundsChange() = 0;
57
58 // Called just before the native window is destroyed. This is the delegate's
59 // last chance to do anything with the native window handle.
60 virtual void OnNativeWindowDestroying() = 0;
61
62 // Called when the native window's position or size has changed.
63 virtual void OnNativeWindowBoundsChanged() = 0;
64
65 // 35 //
66 virtual Window* AsWindow() = 0; 36 virtual Window* AsWindow() = 0;
67 37
68 // 38 //
69 virtual NativeWidgetDelegate* AsNativeWidgetDelegate() = 0; 39 virtual NativeWidgetDelegate* AsNativeWidgetDelegate() = 0;
70 }; 40 };
71 41
72 } // namespace internal 42 } // namespace internal
73 } // namespace views 43 } // namespace views
74 44
75 #endif // VIEWS_WIDGET_NATIVE_WINDOW_DELEGATE_H_ 45 #endif // VIEWS_WIDGET_NATIVE_WINDOW_DELEGATE_H_
OLDNEW
« no previous file with comments | « views/window/native_window.h ('k') | views/window/native_window_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698