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

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

Issue 8872044: Add test cases for panel overflow handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Final patch to land 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 #include "chrome/browser/ui/panels/panel_manager.h" 5 #include "chrome/browser/ui/panels/panel_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/fullscreen.h" 10 #include "chrome/browser/fullscreen.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 245
246 void PanelManager::RemoveAll() { 246 void PanelManager::RemoveAll() {
247 panel_strip_->RemoveAll(); 247 panel_strip_->RemoveAll();
248 panel_overflow_strip_->RemoveAll(); 248 panel_overflow_strip_->RemoveAll();
249 } 249 }
250 250
251 int PanelManager::num_panels() const { 251 int PanelManager::num_panels() const {
252 return panel_strip_->num_panels() + panel_overflow_strip_->num_panels(); 252 return panel_strip_->num_panels() + panel_overflow_strip_->num_panels();
253 } 253 }
254 254
255 const PanelManager::Panels& PanelManager::panels() const { 255 std::vector<Panel*> PanelManager::panels() const {
256 return panel_strip_->panels(); 256 std::vector<Panel*> panels = panel_strip_->panels();
257 for (PanelOverflowStrip::Panels::const_iterator iter =
258 panel_overflow_strip_->panels().begin();
259 iter != panel_overflow_strip_->panels().end(); ++iter)
260 panels.push_back(*iter);
261 return panels;
257 } 262 }
258 263
259 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { 264 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) {
260 panel_mouse_watcher_.reset(watcher); 265 panel_mouse_watcher_.reset(watcher);
261 } 266 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_manager.h ('k') | chrome/browser/ui/panels/panel_mouse_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698