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

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

Issue 8869005: Revert EnableClose() removal and related crash fixes. I don't understand the crashes here, and th... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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) 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
324 // Shows or hides the widget, without changing activation state. 328 // Shows or hides the widget, without changing activation state.
325 virtual void Show(); 329 virtual void Show();
326 void Hide(); 330 void Hide();
327 331
328 // Like Show(), but does not activate the window. 332 // Like Show(), but does not activate the window.
329 void ShowInactive(); 333 void ShowInactive();
330 334
331 // Activates the widget, assuming it already exists and is visible. 335 // Activates the widget, assuming it already exists and is visible.
332 void Activate(); 336 void Activate();
333 337
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 // duplicate move events even though the mouse hasn't moved. 730 // duplicate move events even though the mouse hasn't moved.
727 bool last_mouse_event_was_move_; 731 bool last_mouse_event_was_move_;
728 gfx::Point last_mouse_event_position_; 732 gfx::Point last_mouse_event_position_;
729 733
730 DISALLOW_COPY_AND_ASSIGN(Widget); 734 DISALLOW_COPY_AND_ASSIGN(Widget);
731 }; 735 };
732 736
733 } // namespace views 737 } // namespace views
734 738
735 #endif // UI_VIEWS_WIDGET_WIDGET_H_ 739 #endif // UI_VIEWS_WIDGET_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698