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

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

Issue 8368006: Support Windows native textfield, combobox, etc. in new bubbles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore Widget return; same as Patch Set 9 with updated CreateBubble comment. Created 9 years, 1 month 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/views.gyp ('k') | views/window/client_view.cc » ('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_WINDOW_CLIENT_VIEW_H_ 5 #ifndef VIEWS_WINDOW_CLIENT_VIEW_H_
6 #define VIEWS_WINDOW_CLIENT_VIEW_H_ 6 #define VIEWS_WINDOW_CLIENT_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "views/view.h" 9 #include "views/view.h"
10 10
11 namespace views { 11 namespace views {
12 12
13 class BubbleView;
14 class DialogClientView; 13 class DialogClientView;
15 class Widget; 14 class Widget;
16 15
17 /////////////////////////////////////////////////////////////////////////////// 16 ///////////////////////////////////////////////////////////////////////////////
18 // ClientView 17 // ClientView
19 // 18 //
20 // A ClientView is a View subclass that is used to occupy the "client area" 19 // A ClientView is a View subclass that is used to occupy the "client area"
21 // of a widget. It provides basic information to the widget that contains it 20 // of a widget. It provides basic information to the widget that contains it
22 // such as non-client hit testing information, sizing etc. Sub-classes of 21 // such as non-client hit testing information, sizing etc. Sub-classes of
23 // ClientView are used to create more elaborate contents, e.g. 22 // ClientView are used to create more elaborate contents, e.g.
24 // "DialogClientView". 23 // "DialogClientView".
25 class VIEWS_EXPORT ClientView : public View { 24 class VIEWS_EXPORT ClientView : public View {
26 public: 25 public:
27 // Internal class name 26 // Internal class name
28 static const char kViewClassName[]; 27 static const char kViewClassName[];
29 28
30 // Constructs a ClientView object for the specified widget with the specified 29 // Constructs a ClientView object for the specified widget with the specified
31 // contents. Since this object is created during the process of creating 30 // contents. Since this object is created during the process of creating
32 // |widget|, |contents_view| must be valid if you want the initial size of 31 // |widget|, |contents_view| must be valid if you want the initial size of
33 // the widget to be based on |contents_view|'s preferred size. 32 // the widget to be based on |contents_view|'s preferred size.
34 ClientView(Widget* widget, View* contents_view); 33 ClientView(Widget* widget, View* contents_view);
35 virtual ~ClientView() {} 34 virtual ~ClientView() {}
36 35
37 // Manual RTTI ftw. 36 // Manual RTTI ftw.
38 virtual DialogClientView* AsDialogClientView(); 37 virtual DialogClientView* AsDialogClientView();
39 virtual const DialogClientView* AsDialogClientView() const; 38 virtual const DialogClientView* AsDialogClientView() const;
40 virtual BubbleView* AsBubbleView();
41 virtual const BubbleView* AsBubbleView() const;
42 39
43 // Returns true to signal that the Widget can be closed. Specialized 40 // Returns true to signal that the Widget can be closed. Specialized
44 // ClientView subclasses can override this default behavior to allow the 41 // ClientView subclasses can override this default behavior to allow the
45 // close to be blocked until the user corrects mistakes, accepts a warning 42 // close to be blocked until the user corrects mistakes, accepts a warning
46 // dialog, etc. 43 // dialog, etc.
47 virtual bool CanClose(); 44 virtual bool CanClose();
48 45
49 // Notification that the widget is closing. 46 // Notification that the widget is closing.
50 virtual void WidgetClosing(); 47 virtual void WidgetClosing();
51 48
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // The Widget that hosts this ClientView. 80 // The Widget that hosts this ClientView.
84 Widget* widget_; 81 Widget* widget_;
85 82
86 // The View that this ClientView contains. 83 // The View that this ClientView contains.
87 View* contents_view_; 84 View* contents_view_;
88 }; 85 };
89 86
90 } // namespace views 87 } // namespace views
91 88
92 #endif // #ifndef VIEWS_WINDOW_CLIENT_VIEW_H_ 89 #endif // #ifndef VIEWS_WINDOW_CLIENT_VIEW_H_
OLDNEW
« no previous file with comments | « views/views.gyp ('k') | views/window/client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698