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

Side by Side Diff: chrome/browser/views/frame/browser_view.cc

Issue 159261: When closing the download shelf, hide the buttons of the dangerous download w... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 5 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/views/download_shelf_view.cc ('k') | no next file » | 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/views/frame/browser_view.h" 5 #include "chrome/browser/views/frame/browser_view.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 infobar_container_->SetVisible(visible); 1566 infobar_container_->SetVisible(visible);
1567 infobar_container_->SetBounds(0, top, width(), height); 1567 infobar_container_->SetBounds(0, top, width(), height);
1568 return top + height; 1568 return top + height;
1569 } 1569 }
1570 1570
1571 void BrowserView::LayoutTabContents(int top, int bottom) { 1571 void BrowserView::LayoutTabContents(int top, int bottom) {
1572 contents_split_->SetBounds(0, top, width(), bottom - top); 1572 contents_split_->SetBounds(0, top, width(), bottom - top);
1573 } 1573 }
1574 1574
1575 int BrowserView::LayoutDownloadShelf(int bottom) { 1575 int BrowserView::LayoutDownloadShelf(int bottom) {
1576 if (IsDownloadShelfVisible()) { 1576 // Re-layout the shelf either if it is visible or if it's close animation
1577 // is currently running.
1578 if (IsDownloadShelfVisible() ||
1579 (download_shelf_.get() && download_shelf_->IsClosing())) {
1577 bool visible = browser_->SupportsWindowFeature( 1580 bool visible = browser_->SupportsWindowFeature(
1578 Browser::FEATURE_DOWNLOADSHELF); 1581 Browser::FEATURE_DOWNLOADSHELF);
1579 DCHECK(download_shelf_.get()); 1582 DCHECK(download_shelf_.get());
1580 int height = visible ? download_shelf_->GetPreferredSize().height() : 0; 1583 int height = visible ? download_shelf_->GetPreferredSize().height() : 0;
1581 download_shelf_->SetVisible(visible); 1584 download_shelf_->SetVisible(visible);
1582 download_shelf_->SetBounds(0, bottom - height, width(), height); 1585 download_shelf_->SetBounds(0, bottom - height, width(), height);
1583 download_shelf_->Layout(); 1586 download_shelf_->Layout();
1584 bottom -= height; 1587 bottom -= height;
1585 } 1588 }
1586 return bottom; 1589 return bottom;
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1905 1908
1906 // static 1909 // static
1907 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 1910 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
1908 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 1911 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
1909 } 1912 }
1910 1913
1911 // static 1914 // static
1912 void BrowserList::AllBrowsersClosed() { 1915 void BrowserList::AllBrowsersClosed() {
1913 views::Window::CloseAllSecondaryWindows(); 1916 views::Window::CloseAllSecondaryWindows();
1914 } 1917 }
OLDNEW
« no previous file with comments | « chrome/browser/views/download_shelf_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698