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

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

Issue 8423060: Classification of TODOs in Panel code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cr feedback 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/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 task_delay_milliseconds = 422 task_delay_milliseconds =
423 kMaxMillisecondsWaitForBottomBarVisibilityChange; 423 kMaxMillisecondsWaitForBottomBarVisibilityChange;
424 } 424 }
425 } 425 }
426 426
427 // On some OSes, the interaction with native Taskbars/Docks may be improved 427 // On some OSes, the interaction with native Taskbars/Docks may be improved
428 // if the panels do not go back to minimized state too fast. For example, 428 // if the panels do not go back to minimized state too fast. For example,
429 // it makes it possible to hit the titlebar on OSX if Dock has Magnifying 429 // it makes it possible to hit the titlebar on OSX if Dock has Magnifying
430 // enabled - the panels stay up for a while after Dock magnification effect 430 // enabled - the panels stay up for a while after Dock magnification effect
431 // stops covering the panels. 431 // stops covering the panels.
432 // TODO(dimich): when there is implementation which has both delays to be 432 // Currently, no platforms use both delays.
433 // different from zero, figure out what shoudl be the combined delay. 433 DCHECK(task_delay_milliseconds == 0);
434 if (!bring_up && 434 if (!bring_up)
435 task_delay_milliseconds < kMillisecondsBeforeCollapsingFromTitleOnlyState)
436 task_delay_milliseconds = kMillisecondsBeforeCollapsingFromTitleOnlyState; 435 task_delay_milliseconds = kMillisecondsBeforeCollapsingFromTitleOnlyState;
437 436
438 // OnAutoHidingDesktopBarVisibilityChanged will handle this. 437 // OnAutoHidingDesktopBarVisibilityChanged will handle this.
439 delayed_titlebar_action_ = bring_up ? BRING_UP : BRING_DOWN; 438 delayed_titlebar_action_ = bring_up ? BRING_UP : BRING_DOWN;
440 if (remove_delays_for_testing_) 439 if (remove_delays_for_testing_)
441 task_delay_milliseconds = 0; 440 task_delay_milliseconds = 0;
442 441
443 // If user moves the mouse in and out of mouse tracking area, we might have 442 // If user moves the mouse in and out of mouse tracking area, we might have
444 // previously posted but not yet dispatched task in the queue. New action 443 // previously posted but not yet dispatched task in the queue. New action
445 // shoudl always 'reset' the delays so cancel the old task and post a new one. 444 // shoudl always 'reset' the delays so cancel the old task and post a new one.
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 // Start from the bottom to avoid reshuffling. 596 // Start from the bottom to avoid reshuffling.
598 for (Panels::reverse_iterator iter = panels_copy.rbegin(); 597 for (Panels::reverse_iterator iter = panels_copy.rbegin();
599 iter != panels_copy.rend(); ++iter) 598 iter != panels_copy.rend(); ++iter)
600 (*iter)->Close(); 599 (*iter)->Close();
601 } 600 }
602 601
603 bool PanelManager::is_dragging_panel() const { 602 bool PanelManager::is_dragging_panel() const {
604 return dragging_panel_index_ != kInvalidPanelIndex; 603 return dragging_panel_index_ != kInvalidPanelIndex;
605 } 604 }
606 605
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_manager.h ('k') | chrome/browser/ui/panels/panel_settings_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698