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

Side by Side Diff: chrome/browser/ui/views/panels/panel_frame_view.cc

Issue 554183002: Update the maximize button when size constraints change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update NativeWidgetMac. Created 6 years, 3 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
« no previous file with comments | « chrome/browser/ui/views/panels/panel_frame_view.h ('k') | ui/views/bubble/bubble_frame_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/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 void PanelFrameView::SizeConstraintsChanged() {
493 }
494
492 gfx::Size PanelFrameView::GetPreferredSize() const { 495 gfx::Size PanelFrameView::GetPreferredSize() const {
493 gfx::Size pref_size = 496 gfx::Size pref_size =
494 panel_view_->window()->client_view()->GetPreferredSize(); 497 panel_view_->window()->client_view()->GetPreferredSize();
495 gfx::Rect bounds(0, 0, pref_size.width(), pref_size.height()); 498 gfx::Rect bounds(0, 0, pref_size.width(), pref_size.height());
496 return panel_view_->window()->non_client_view()-> 499 return panel_view_->window()->non_client_view()->
497 GetWindowBoundsForClientBounds(bounds).size(); 500 GetWindowBoundsForClientBounds(bounds).size();
498 } 501 }
499 502
500 const char* PanelFrameView::GetClassName() const { 503 const char* PanelFrameView::GetClassName() const {
501 return kViewClassName; 504 return kViewClassName;
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 #endif 770 #endif
768 } 771 }
769 772
770 bool PanelFrameView::IsWithinResizingArea( 773 bool PanelFrameView::IsWithinResizingArea(
771 const gfx::Point& mouse_location) const { 774 const gfx::Point& mouse_location) const {
772 panel::Resizability resizability = panel_view_->panel()->CanResizeByMouse(); 775 panel::Resizability resizability = panel_view_->panel()->CanResizeByMouse();
773 int edge_hittest = GetFrameEdgeHitTest( 776 int edge_hittest = GetFrameEdgeHitTest(
774 mouse_location, size(), PanelView::kResizeInsideBoundsSize, resizability); 777 mouse_location, size(), PanelView::kResizeInsideBoundsSize, resizability);
775 return edge_hittest != HTNOWHERE; 778 return edge_hittest != HTNOWHERE;
776 } 779 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/panels/panel_frame_view.h ('k') | ui/views/bubble/bubble_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698