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

Unified Diff: ui/aura/toplevel_window_event_filter.cc

Issue 8400063: Move maximize/fullscreen/restore to shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove OVERRIDE from .cc Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/layout_manager.cc ('k') | ui/aura/toplevel_window_event_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/toplevel_window_event_filter.cc
diff --git a/ui/aura/toplevel_window_event_filter.cc b/ui/aura/toplevel_window_event_filter.cc
index a4920725c8c86db2646e3880c56d3e0ce2001dbb..165d35da6643e17b8b8d5a2c32ab22ed4a32bcb5 100644
--- a/ui/aura/toplevel_window_event_filter.cc
+++ b/ui/aura/toplevel_window_event_filter.cc
@@ -4,12 +4,14 @@
#include "ui/aura/toplevel_window_event_filter.h"
+#include "ui/aura/aura_constants.h"
#include "ui/aura/cursor.h"
#include "ui/aura/desktop.h"
#include "ui/aura/event.h"
#include "ui/aura/hit_test.h"
#include "ui/aura/window.h"
#include "ui/aura/window_delegate.h"
+#include "ui/base/ui_base_types.h"
namespace aura {
@@ -150,12 +152,6 @@ bool ToplevelWindowEventFilter::PreHandleMouseEvent(Window* target,
case ui::ET_MOUSE_DRAGGED:
return HandleDrag(target, event);
case ui::ET_MOUSE_RELEASED:
- if (window_component_ == HTMAXBUTTON) {
- if (target->show_state() == ui::SHOW_STATE_MAXIMIZED)
- target->Restore();
- else
- target->Maximize();
- }
window_component_ = HTNOWHERE;
break;
default:
@@ -190,8 +186,9 @@ bool ToplevelWindowEventFilter::HandleDrag(Window* target, MouseEvent* event) {
if (bounds_change == kBoundsChange_None)
return false;
- // Only a normal window can be moved/resized.
- if (target->show_state() != ui::SHOW_STATE_NORMAL)
+ // Only a normal/default window can be moved/resized.
+ if (target->GetIntProperty(aura::kShowStateKey) != ui::SHOW_STATE_NORMAL &&
+ target->GetIntProperty(aura::kShowStateKey) != ui::SHOW_STATE_DEFAULT)
return false;
target->SetBounds(gfx::Rect(GetOriginForDrag(bounds_change, target, event),
« no previous file with comments | « ui/aura/layout_manager.cc ('k') | ui/aura/toplevel_window_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698