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

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

Issue 9546001: Support detaching/attaching panels via inter-strip drags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/overflow_panel_strip.h" 5 #include "chrome/browser/ui/panels/overflow_panel_strip.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/ui/panels/docked_panel_strip.h" 8 #include "chrome/browser/ui/panels/docked_panel_strip.h"
9 #include "chrome/browser/ui/panels/panel_manager.h" 9 #include "chrome/browser/ui/panels/panel_manager.h"
10 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" 10 #include "chrome/browser/ui/panels/panel_mouse_watcher.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // Update the overflow indicator only when the number of overflow panels go 108 // Update the overflow indicator only when the number of overflow panels go
109 // beyond the maximum visible limit. 109 // beyond the maximum visible limit.
110 if (num_panels() > max_visible_panels_) { 110 if (num_panels() > max_visible_panels_) {
111 if (!overflow_indicator_.get()) { 111 if (!overflow_indicator_.get()) {
112 overflow_indicator_.reset(PanelOverflowIndicator::Create()); 112 overflow_indicator_.reset(PanelOverflowIndicator::Create());
113 } 113 }
114 UpdateOverflowIndicatorCount(); 114 UpdateOverflowIndicatorCount();
115 } 115 }
116 } 116 }
117 117
118 void OverflowPanelStrip::AddPanelAtPosition(Panel* panel,
119 const gfx::Point& position) {
120 NOTREACHED();
121 }
122
118 bool OverflowPanelStrip::RemovePanel(Panel* panel) { 123 bool OverflowPanelStrip::RemovePanel(Panel* panel) {
119 size_t index = 0; 124 size_t index = 0;
120 Panels::iterator iter = panels_.begin(); 125 Panels::iterator iter = panels_.begin();
121 for (; iter != panels_.end(); ++iter, ++index) 126 for (; iter != panels_.end(); ++iter, ++index)
122 if (*iter == panel) 127 if (*iter == panel)
123 break; 128 break;
124 if (iter == panels_.end()) 129 if (iter == panels_.end())
125 return false; 130 return false;
126 131
127 panels_.erase(iter); 132 panels_.erase(iter);
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 // expanded overflow panels when in full screen mode so no need 400 // expanded overflow panels when in full screen mode so no need
396 // to detect when mouse hovers over the overflow strip. 401 // to detect when mouse hovers over the overflow strip.
397 if (is_full_screen) 402 if (is_full_screen)
398 panel_manager_->mouse_watcher()->RemoveObserver(this); 403 panel_manager_->mouse_watcher()->RemoveObserver(this);
399 else 404 else
400 panel_manager_->mouse_watcher()->AddObserver(this); 405 panel_manager_->mouse_watcher()->AddObserver(this);
401 406
402 for (size_t i = 0; i < panels_.size(); ++i) 407 for (size_t i = 0; i < panels_.size(); ++i)
403 panels_[i]->FullScreenModeChanged(is_full_screen); 408 panels_[i]->FullScreenModeChanged(is_full_screen);
404 } 409 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698