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

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: 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 // When there is an implementation that employs both delays, figure out how
433 // different from zero, figure out what shoudl be the combined delay. 433 // to combine them.
prasadt 2011/11/02 23:01:58 That sounds like a TODO that doesn't say TODO. Sho
Dmitry Titov 2011/11/02 23:32:19 I've reworded it, wanted an explanation for an ass
434 if (!bring_up && 434 DCHECK(task_delay_milliseconds == 0);
435 task_delay_milliseconds < kMillisecondsBeforeCollapsingFromTitleOnlyState) 435 if (!bring_up)
Dmitry Titov 2011/11/02 22:15:01 Who was I kidding? Having code for non-existing an
436 task_delay_milliseconds = kMillisecondsBeforeCollapsingFromTitleOnlyState; 436 task_delay_milliseconds = kMillisecondsBeforeCollapsingFromTitleOnlyState;
437 437
438 // OnAutoHidingDesktopBarVisibilityChanged will handle this. 438 // OnAutoHidingDesktopBarVisibilityChanged will handle this.
439 delayed_titlebar_action_ = bring_up ? BRING_UP : BRING_DOWN; 439 delayed_titlebar_action_ = bring_up ? BRING_UP : BRING_DOWN;
440 if (remove_delays_for_testing_) 440 if (remove_delays_for_testing_)
441 task_delay_milliseconds = 0; 441 task_delay_milliseconds = 0;
442 442
443 // If user moves the mouse in and out of mouse tracking area, we might have 443 // 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 444 // 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. 445 // 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. 597 // Start from the bottom to avoid reshuffling.
598 for (Panels::reverse_iterator iter = panels_copy.rbegin(); 598 for (Panels::reverse_iterator iter = panels_copy.rbegin();
599 iter != panels_copy.rend(); ++iter) 599 iter != panels_copy.rend(); ++iter)
600 (*iter)->Close(); 600 (*iter)->Close();
601 } 601 }
602 602
603 bool PanelManager::is_dragging_panel() const { 603 bool PanelManager::is_dragging_panel() const {
604 return dragging_panel_index_ != kInvalidPanelIndex; 604 return dragging_panel_index_ != kInvalidPanelIndex;
605 } 605 }
606 606
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698