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

Unified Diff: chrome/browser/ui/views/constrained_window_views.cc

Issue 7036014: Consolidate ShouldUseNativeFrame/AlwaysUseNativeFrame/UseNativeFrame spaghetti. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/constrained_window_views.cc
===================================================================
--- chrome/browser/ui/views/constrained_window_views.cc (revision 85647)
+++ chrome/browser/ui/views/constrained_window_views.cc (working copy)
@@ -155,7 +155,6 @@
// Overridden from views::NonClientFrameView:
virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
- virtual bool AlwaysUseCustomFrame() const OVERRIDE;
virtual gfx::Rect GetWindowBoundsForClientBounds(
const gfx::Rect& client_bounds) const OVERRIDE;
virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
@@ -273,6 +272,10 @@
InitClass();
InitWindowResources();
+ // Constrained windows always use the custom frame - they just have a
+ // different set of bitmaps.
+ container->set_frame_type(views::Window::FRAME_TYPE_FORCE_CUSTOM);
+
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
close_button_->SetImage(views::CustomButton::BS_NORMAL,
rb.GetBitmapNamed(IDR_CLOSE_SA));
@@ -299,12 +302,6 @@
return client_view_bounds_;
}
-bool ConstrainedWindowFrameView::AlwaysUseCustomFrame() const {
- // Constrained windows always use the custom frame - they just have a
- // different set of bitmaps.
- return true;
-}
-
gfx::Rect ConstrainedWindowFrameView::GetWindowBoundsForClientBounds(
const gfx::Rect& client_bounds) const {
int top_height = NonClientTopBorderHeight();
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_frame_view.cc ('k') | chrome/browser/ui/views/frame/app_panel_browser_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698