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

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

Issue 13853010: Make panels turn on or off shadow effect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback Created 7 years, 8 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
« no previous file with comments | « chrome/browser/ui/panels/panel.cc ('k') | chrome/browser/ui/views/panels/panel_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/stacked_panel_collection.h" 5 #include "chrome/browser/ui/panels/stacked_panel_collection.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/ui/panels/detached_panel_collection.h" 10 #include "chrome/browser/ui/panels/detached_panel_collection.h"
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 515
516 bool StackedPanelCollection::HasPanel(Panel* panel) const { 516 bool StackedPanelCollection::HasPanel(Panel* panel) const {
517 return std::find(panels_.begin(), panels_.end(), panel) != panels_.end(); 517 return std::find(panels_.begin(), panels_.end(), panel) != panels_.end();
518 } 518 }
519 519
520 void StackedPanelCollection::UpdatePanelOnCollectionChange(Panel* panel) { 520 void StackedPanelCollection::UpdatePanelOnCollectionChange(Panel* panel) {
521 panel->set_attention_mode( 521 panel->set_attention_mode(
522 static_cast<Panel::AttentionMode>(Panel::USE_PANEL_ATTENTION | 522 static_cast<Panel::AttentionMode>(Panel::USE_PANEL_ATTENTION |
523 Panel::USE_SYSTEM_ATTENTION)); 523 Panel::USE_SYSTEM_ATTENTION));
524 panel->SetAlwaysOnTop(false); 524 panel->SetAlwaysOnTop(false);
525 // TODO(jianli): Change from true to false when the background window is used
526 // to provide the shadow.
527 panel->ShowShadow(true);
525 panel->EnableResizeByMouse(true); 528 panel->EnableResizeByMouse(true);
526 panel->UpdateMinimizeRestoreButtonVisibility(); 529 panel->UpdateMinimizeRestoreButtonVisibility();
527 UpdatePanelCornerStyle(panel); 530 UpdatePanelCornerStyle(panel);
528 } 531 }
529 532
530 void StackedPanelCollection::OnPanelExpansionStateChanged(Panel* panel) { 533 void StackedPanelCollection::OnPanelExpansionStateChanged(Panel* panel) {
531 DCHECK_NE(Panel::MINIMIZED, panel->expansion_state()); 534 DCHECK_NE(Panel::MINIMIZED, panel->expansion_state());
532 535
533 gfx::Rect bounds = panel->GetBounds(); 536 gfx::Rect bounds = panel->GetBounds();
534 bounds.set_height(panel->expansion_state() == Panel::EXPANDED ? 537 bounds.set_height(panel->expansion_state() == Panel::EXPANDED ?
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 if (panel->IsActive()) 661 if (panel->IsActive())
659 bottom += panel->GetBounds().height(); 662 bottom += panel->GetBounds().height();
660 else 663 else
661 bottom += panel::kTitlebarHeight; 664 bottom += panel::kTitlebarHeight;
662 } 665 }
663 int available_space = work_area.bottom() - bottom; 666 int available_space = work_area.bottom() - bottom;
664 if (available_space < 0) 667 if (available_space < 0)
665 available_space = 0; 668 available_space = 0;
666 return available_space; 669 return available_space;
667 } 670 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel.cc ('k') | chrome/browser/ui/views/panels/panel_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698