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

Side by Side Diff: chrome/browser/ui/views/panels/panel_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_view.h" 5 #include "chrome/browser/ui/views/panels/panel_view.h"
6 6
7 #include <map> 7 #include <map>
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 window_->UpdateWindowIcon(); 895 window_->UpdateWindowIcon();
896 GetFrameView()->UpdateIcon(); 896 GetFrameView()->UpdateIcon();
897 } 897 }
898 898
899 void PanelView::Layout() { 899 void PanelView::Layout() {
900 // |web_view_| might not be created yet when the window is first created. 900 // |web_view_| might not be created yet when the window is first created.
901 if (web_view_) 901 if (web_view_)
902 web_view_->SetBounds(0, 0, width(), height()); 902 web_view_->SetBounds(0, 0, width(), height());
903 } 903 }
904 904
905 gfx::Size PanelView::GetMinimumSize() { 905 gfx::Size PanelView::GetMinimumSize() const {
906 // If the panel is minimized, it can be rendered to very small size, like 906 // If the panel is minimized, it can be rendered to very small size, like
907 // 4-pixel lines when it is docked. Otherwise, its size should not be less 907 // 4-pixel lines when it is docked. Otherwise, its size should not be less
908 // than its minimum size. 908 // than its minimum size.
909 return panel_->IsMinimized() ? gfx::Size() : 909 return panel_->IsMinimized() ? gfx::Size() :
910 gfx::Size(panel::kPanelMinWidth, panel::kPanelMinHeight); 910 gfx::Size(panel::kPanelMinWidth, panel::kPanelMinHeight);
911 } 911 }
912 912
913 gfx::Size PanelView::GetMaximumSize() { 913 gfx::Size PanelView::GetMaximumSize() {
914 // If the user is resizing a stacked panel by its bottom edge, make sure its 914 // If the user is resizing a stacked panel by its bottom edge, make sure its
915 // height cannot grow more than what the panel below it could offer. This is 915 // height cannot grow more than what the panel below it could offer. This is
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 // SWP_FRAMECHANGED flag must be called in order for the cached window data 1125 // SWP_FRAMECHANGED flag must be called in order for the cached window data
1126 // to be updated properly. 1126 // to be updated properly.
1127 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).a spx 1127 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).a spx
1128 if (update_frame) { 1128 if (update_frame) {
1129 ::SetWindowPos(native_window, NULL, 0, 0, 0, 0, 1129 ::SetWindowPos(native_window, NULL, 0, 0, 0, 0,
1130 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | 1130 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE |
1131 SWP_NOZORDER | SWP_NOACTIVATE); 1131 SWP_NOZORDER | SWP_NOACTIVATE);
1132 } 1132 }
1133 } 1133 }
1134 #endif 1134 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/panels/panel_view.h ('k') | chrome/browser/ui/views/password_generation_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698