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

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

Issue 8618001: Get rid of the EnableClose() infrastructure in Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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 | « ui/views/widget/native_widget_win.cc ('k') | ui/views/widget/widget.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 UI_VIEWS_WIDGET_WIDGET_H_ 5 #ifndef UI_VIEWS_WIDGET_WIDGET_H_
6 #define UI_VIEWS_WIDGET_WIDGET_H_ 6 #define UI_VIEWS_WIDGET_WIDGET_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <stack> 10 #include <stack>
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 314
315 // Hides the widget then closes it after a return to the message loop. 315 // Hides the widget then closes it after a return to the message loop.
316 virtual void Close(); 316 virtual void Close();
317 317
318 // TODO(beng): Move off public API. 318 // TODO(beng): Move off public API.
319 // Closes the widget immediately. Compare to |Close|. This will destroy the 319 // Closes the widget immediately. Compare to |Close|. This will destroy the
320 // window handle associated with this Widget, so should not be called from 320 // window handle associated with this Widget, so should not be called from
321 // any code that expects it to be valid beyond this call. 321 // any code that expects it to be valid beyond this call.
322 void CloseNow(); 322 void CloseNow();
323 323
324 // Toggles the enable state for the Close button (and the Close menu item in
325 // the system menu).
326 void EnableClose(bool enable);
327
328 // Shows or hides the widget, without changing activation state. 324 // Shows or hides the widget, without changing activation state.
329 virtual void Show(); 325 virtual void Show();
330 void Hide(); 326 void Hide();
331 327
332 // Like Show(), but does not activate the window. 328 // Like Show(), but does not activate the window.
333 void ShowInactive(); 329 void ShowInactive();
334 330
335 // Activates the widget, assuming it already exists and is visible. 331 // Activates the widget, assuming it already exists and is visible.
336 void Activate(); 332 void Activate();
337 333
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 // duplicate move events even though the mouse hasn't moved. 733 // duplicate move events even though the mouse hasn't moved.
738 bool last_mouse_event_was_move_; 734 bool last_mouse_event_was_move_;
739 gfx::Point last_mouse_event_position_; 735 gfx::Point last_mouse_event_position_;
740 736
741 DISALLOW_COPY_AND_ASSIGN(Widget); 737 DISALLOW_COPY_AND_ASSIGN(Widget);
742 }; 738 };
743 739
744 } // namespace views 740 } // namespace views
745 741
746 #endif // UI_VIEWS_WIDGET_WIDGET_H_ 742 #endif // UI_VIEWS_WIDGET_WIDGET_H_
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_win.cc ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698