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

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

Issue 8621002: Reduce minimum size of Panels to allow 1-text-line tight autosize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: hopefully final 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
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 #include "chrome/browser/ui/panels/panel_manager.h" 5 #include "chrome/browser/ui/panels/panel_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // See usage below. 44 // See usage below.
45 #if defined(TOOLKIT_GTK) 45 #if defined(TOOLKIT_GTK)
46 const int kMillisecondsBeforeCollapsingFromTitleOnlyState = 2000; 46 const int kMillisecondsBeforeCollapsingFromTitleOnlyState = 2000;
47 #else 47 #else
48 const int kMillisecondsBeforeCollapsingFromTitleOnlyState = 0; 48 const int kMillisecondsBeforeCollapsingFromTitleOnlyState = 0;
49 #endif 49 #endif
50 } // namespace 50 } // namespace
51 51
52 // static 52 // static
53 const int PanelManager::kPanelMinWidth = 100;
54 const int PanelManager::kPanelMinHeight = 20;
55
56 // static
53 PanelManager* PanelManager::GetInstance() { 57 PanelManager* PanelManager::GetInstance() {
54 static base::LazyInstance<PanelManager> instance = LAZY_INSTANCE_INITIALIZER; 58 static base::LazyInstance<PanelManager> instance = LAZY_INSTANCE_INITIALIZER;
55 return instance.Pointer(); 59 return instance.Pointer();
56 } 60 }
57 61
58 PanelManager::PanelManager() 62 PanelManager::PanelManager()
59 : minimized_panel_count_(0), 63 : minimized_panel_count_(0),
60 are_titlebars_up_(false), 64 are_titlebars_up_(false),
61 dragging_panel_index_(kInvalidPanelIndex), 65 dragging_panel_index_(kInvalidPanelIndex),
62 dragging_panel_original_x_(0), 66 dragging_panel_original_x_(0),
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 632
629 // Start from the bottom to avoid reshuffling. 633 // Start from the bottom to avoid reshuffling.
630 for (Panels::reverse_iterator iter = panels_copy.rbegin(); 634 for (Panels::reverse_iterator iter = panels_copy.rbegin();
631 iter != panels_copy.rend(); ++iter) 635 iter != panels_copy.rend(); ++iter)
632 (*iter)->Close(); 636 (*iter)->Close();
633 } 637 }
634 638
635 bool PanelManager::is_dragging_panel() const { 639 bool PanelManager::is_dragging_panel() const {
636 return dragging_panel_index_ != kInvalidPanelIndex; 640 return dragging_panel_index_ != kInvalidPanelIndex;
637 } 641 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_manager.h ('k') | chrome/test/data/extensions/api_test/window_update/show_state/test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698