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

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

Issue 10408047: Fix bug 105043: Panels [WIN]: For minimize panels, taskbar hover preview show the 4-pixel represent… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
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_WIDGET_DELEGATE_H_ 5 #ifndef UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_
6 #define UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ 6 #define UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // Called by the Widget to create the NonClient Frame View for this widget. 140 // Called by the Widget to create the NonClient Frame View for this widget.
141 // Return NULL to use the default one. 141 // Return NULL to use the default one.
142 virtual NonClientFrameView* CreateNonClientFrameView(Widget* widget); 142 virtual NonClientFrameView* CreateNonClientFrameView(Widget* widget);
143 143
144 // Returns true if the window can be notified with the work area change. 144 // Returns true if the window can be notified with the work area change.
145 // Otherwise, the work area change for the top window will be processed by 145 // Otherwise, the work area change for the top window will be processed by
146 // the default window manager. In some cases, like panel, we would like to 146 // the default window manager. In some cases, like panel, we would like to
147 // manage the positions by ourselves. 147 // manage the positions by ourselves.
148 virtual bool WillProcessWorkAreaChange() const; 148 virtual bool WillProcessWorkAreaChange() const;
149 149
150 // Returns the preview image that appears when a user moves the mouse
151 // pointer over the window's thumbnail in the taskbar. This is only supported
152 // int Windows 7 and later.
153 // The returned image should not exceed |size|. If |live| is true, the image
154 // is used for live preview. Otherwise, it is shown as thumbnail.
155 virtual SkBitmap GetPreviewImage(const gfx::Size& size, bool live);
156
150 protected: 157 protected:
151 virtual ~WidgetDelegate() {} 158 virtual ~WidgetDelegate() {}
152 159
153 private: 160 private:
154 View* default_contents_view_; 161 View* default_contents_view_;
155 162
156 DISALLOW_COPY_AND_ASSIGN(WidgetDelegate); 163 DISALLOW_COPY_AND_ASSIGN(WidgetDelegate);
157 }; 164 };
158 165
159 // A WidgetDelegate implementation that is-a View. Used to override GetWidget() 166 // A WidgetDelegate implementation that is-a View. Used to override GetWidget()
160 // to call View's GetWidget() for the common case where a WidgetDelegate 167 // to call View's GetWidget() for the common case where a WidgetDelegate
161 // implementation is-a View. 168 // implementation is-a View.
162 class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View { 169 class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
163 public: 170 public:
164 WidgetDelegateView(); 171 WidgetDelegateView();
165 virtual ~WidgetDelegateView(); 172 virtual ~WidgetDelegateView();
166 173
167 // Overridden from WidgetDelegate: 174 // Overridden from WidgetDelegate:
168 virtual Widget* GetWidget() OVERRIDE; 175 virtual Widget* GetWidget() OVERRIDE;
169 virtual const Widget* GetWidget() const OVERRIDE; 176 virtual const Widget* GetWidget() const OVERRIDE;
170 177
171 private: 178 private:
172 DISALLOW_COPY_AND_ASSIGN(WidgetDelegateView); 179 DISALLOW_COPY_AND_ASSIGN(WidgetDelegateView);
173 }; 180 };
174 181
175 } // namespace views 182 } // namespace views
176 183
177 #endif // UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_ 184 #endif // UI_VIEWS_WIDGET_WIDGET_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698