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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view_layout.cc

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/views/frame/browser_view_layout.h" 5 #include "chrome/browser/ui/views/frame/browser_view_layout.h"
6 6
7 #include "base/observer_list.h" 7 #include "base/observer_list.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_finder.h" 10 #include "chrome/browser/ui/browser_finder.h"
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 const gfx::Rect dialog_bounds(dialog_host_->GetDialogPosition(gfx::Size()), 363 const gfx::Rect dialog_bounds(dialog_host_->GetDialogPosition(gfx::Size()),
364 dialog_host_->GetMaximumDialogSize()); 364 dialog_host_->GetMaximumDialogSize());
365 if (latest_dialog_bounds_ != dialog_bounds) { 365 if (latest_dialog_bounds_ != dialog_bounds) {
366 latest_dialog_bounds_ = dialog_bounds; 366 latest_dialog_bounds_ = dialog_bounds;
367 dialog_host_->NotifyPositionRequiresUpdate(); 367 dialog_host_->NotifyPositionRequiresUpdate();
368 } 368 }
369 } 369 }
370 370
371 // Return the preferred size which is the size required to give each 371 // Return the preferred size which is the size required to give each
372 // children their respective preferred size. 372 // children their respective preferred size.
373 gfx::Size BrowserViewLayout::GetPreferredSize(views::View* host) { 373 gfx::Size BrowserViewLayout::GetPreferredSize(const views::View* host) const {
374 return gfx::Size(); 374 return gfx::Size();
375 } 375 }
376 376
377 ////////////////////////////////////////////////////////////////////////////// 377 //////////////////////////////////////////////////////////////////////////////
378 // BrowserViewLayout, private: 378 // BrowserViewLayout, private:
379 379
380 int BrowserViewLayout::LayoutTabStripRegion(int top) { 380 int BrowserViewLayout::LayoutTabStripRegion(int top) {
381 if (!delegate_->IsTabStripVisible()) { 381 if (!delegate_->IsTabStripVisible()) {
382 tab_strip_->SetVisible(false); 382 tab_strip_->SetVisible(false);
383 tab_strip_->SetBounds(0, 0, 0, 0); 383 tab_strip_->SetBounds(0, 0, 0, 0);
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 return bottom; 540 return bottom;
541 } 541 }
542 542
543 bool BrowserViewLayout::InfobarVisible() const { 543 bool BrowserViewLayout::InfobarVisible() const {
544 // Cast to a views::View to access GetPreferredSize(). 544 // Cast to a views::View to access GetPreferredSize().
545 views::View* infobar_container = infobar_container_; 545 views::View* infobar_container = infobar_container_;
546 // NOTE: Can't check if the size IsEmpty() since it's always 0-width. 546 // NOTE: Can't check if the size IsEmpty() since it's always 0-width.
547 return browser_->SupportsWindowFeature(Browser::FEATURE_INFOBAR) && 547 return browser_->SupportsWindowFeature(Browser::FEATURE_INFOBAR) &&
548 (infobar_container->GetPreferredSize().height() != 0); 548 (infobar_container->GetPreferredSize().height() != 0);
549 } 549 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view_layout.h ('k') | chrome/browser/ui/views/frame/browser_view_layout_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698