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

Side by Side Diff: chrome/browser/ui/views/panels/panel_frame_view.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 (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/views/panels/panel_frame_view.h" 5 #include "chrome/browser/ui/views/panels/panel_frame_view.h"
6 6
7 #include "chrome/browser/ui/panels/panel.h" 7 #include "chrome/browser/ui/panels/panel.h"
8 #include "chrome/browser/ui/panels/panel_constants.h" 8 #include "chrome/browser/ui/panels/panel_constants.h"
9 #include "chrome/browser/ui/views/panels/panel_view.h" 9 #include "chrome/browser/ui/views/panels/panel_view.h"
10 #include "chrome/browser/ui/views/tab_icon_view.h" 10 #include "chrome/browser/ui/views/tab_icon_view.h"
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 } 482 }
483 483
484 void PanelFrameView::UpdateWindowIcon() { 484 void PanelFrameView::UpdateWindowIcon() {
485 title_icon_->SchedulePaint(); 485 title_icon_->SchedulePaint();
486 } 486 }
487 487
488 void PanelFrameView::UpdateWindowTitle() { 488 void PanelFrameView::UpdateWindowTitle() {
489 title_label_->SetText(panel_view_->panel()->GetWindowTitle()); 489 title_label_->SetText(panel_view_->panel()->GetWindowTitle());
490 } 490 }
491 491
492 gfx::Size PanelFrameView::GetPreferredSize() { 492 gfx::Size PanelFrameView::GetPreferredSize() const {
493 gfx::Size pref_size = 493 gfx::Size pref_size =
494 panel_view_->window()->client_view()->GetPreferredSize(); 494 panel_view_->window()->client_view()->GetPreferredSize();
495 gfx::Rect bounds(0, 0, pref_size.width(), pref_size.height()); 495 gfx::Rect bounds(0, 0, pref_size.width(), pref_size.height());
496 return panel_view_->window()->non_client_view()-> 496 return panel_view_->window()->non_client_view()->
497 GetWindowBoundsForClientBounds(bounds).size(); 497 GetWindowBoundsForClientBounds(bounds).size();
498 } 498 }
499 499
500 const char* PanelFrameView::GetClassName() const { 500 const char* PanelFrameView::GetClassName() const {
501 return kViewClassName; 501 return kViewClassName;
502 } 502 }
503 503
504 gfx::Size PanelFrameView::GetMinimumSize() { 504 gfx::Size PanelFrameView::GetMinimumSize() const {
505 return panel_view_->GetMinimumSize(); 505 return panel_view_->GetMinimumSize();
506 } 506 }
507 507
508 gfx::Size PanelFrameView::GetMaximumSize() { 508 gfx::Size PanelFrameView::GetMaximumSize() {
509 return panel_view_->GetMaximumSize(); 509 return panel_view_->GetMaximumSize();
510 } 510 }
511 511
512 void PanelFrameView::Layout() { 512 void PanelFrameView::Layout() {
513 is_frameless_ = ShouldRenderAsFrameless(); 513 is_frameless_ = ShouldRenderAsFrameless();
514 514
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 759
760 // Draw the left border. 760 // Draw the left border.
761 canvas->TileImageInt(left_image, 761 canvas->TileImageInt(left_image,
762 0, 762 0,
763 top_left_image.height(), 763 top_left_image.height(),
764 left_image.width(), 764 left_image.width(),
765 height() - top_left_image.height() - 765 height() - top_left_image.height() -
766 bottom_left_image.height()); 766 bottom_left_image.height());
767 #endif 767 #endif
768 } 768 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/panels/panel_frame_view.h ('k') | chrome/browser/ui/views/panels/panel_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698