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

Side by Side Diff: chrome/browser/ui/panels/detached_panel_strip.cc

Issue 9517010: Change panels to be able to turn off autoresize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address feedback and fix issue with preferred size and auto resize having the same callback. Created 8 years, 9 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 #include "chrome/browser/ui/panels/detached_panel_strip.h" 5 #include "chrome/browser/ui/panels/detached_panel_strip.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/ui/panels/panel_drag_controller.h" 9 #include "chrome/browser/ui/panels/panel_drag_controller.h"
10 #include "chrome/browser/ui/panels/panel_manager.h" 10 #include "chrome/browser/ui/panels/panel_manager.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 iter != panels_copy.end(); ++iter) 54 iter != panels_copy.end(); ++iter)
55 (*iter)->Close(); 55 (*iter)->Close();
56 } 56 }
57 57
58 void DetachedPanelStrip::OnPanelAttentionStateChanged(Panel* panel) { 58 void DetachedPanelStrip::OnPanelAttentionStateChanged(Panel* panel) {
59 DCHECK_EQ(this, panel->panel_strip()); 59 DCHECK_EQ(this, panel->panel_strip());
60 NOTIMPLEMENTED(); 60 NOTIMPLEMENTED();
61 } 61 }
62 62
63 void DetachedPanelStrip::ResizePanelWindow( 63 void DetachedPanelStrip::ResizePanelWindow(
64 Panel* panel, const gfx::Size& preferred_window_size) { 64 Panel* panel,
65 const gfx::Size& preferred_window_size) {
65 NOTIMPLEMENTED(); 66 NOTIMPLEMENTED();
66 } 67 }
67 68
68 void DetachedPanelStrip::ActivatePanel(Panel* panel) { 69 void DetachedPanelStrip::ActivatePanel(Panel* panel) {
69 DCHECK_EQ(this, panel->panel_strip()); 70 DCHECK_EQ(this, panel->panel_strip());
70 NOTIMPLEMENTED(); 71 NOTIMPLEMENTED();
71 } 72 }
72 73
73 void DetachedPanelStrip::MinimizePanel(Panel* panel) { 74 void DetachedPanelStrip::MinimizePanel(Panel* panel) {
74 DCHECK_EQ(this, panel->panel_strip()); 75 DCHECK_EQ(this, panel->panel_strip());
(...skipping 25 matching lines...) Expand all
100 } 101 }
101 102
102 void DetachedPanelStrip::EndDraggingPanel(Panel* panel, bool cancelled) { 103 void DetachedPanelStrip::EndDraggingPanel(Panel* panel, bool cancelled) {
103 if (cancelled) { 104 if (cancelled) {
104 gfx::Rect new_bounds(panel->GetBounds()); 105 gfx::Rect new_bounds(panel->GetBounds());
105 new_bounds.set_origin( 106 new_bounds.set_origin(
106 panel_manager_->drag_controller()->dragging_panel_original_position()); 107 panel_manager_->drag_controller()->dragging_panel_original_position());
107 panel->SetPanelBounds(new_bounds); 108 panel->SetPanelBounds(new_bounds);
108 } 109 }
109 } 110 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698