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

Unified Diff: views/controls/button/native_button_win.h

Issue 2812026: Auto-size the views version of the options dialog. (Closed)
Patch Set: Fix autosizing issue with gtk pref pages in chromeos options dialog. Created 10 years, 6 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | views/controls/button/native_button_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/button/native_button_win.h
diff --git a/views/controls/button/native_button_win.h b/views/controls/button/native_button_win.h
index 20ce575a3b55c1c1b3a20940dca448b1d975091e..95b8a5acbc701c477d9506b9e4f5c51c49adf397 100644
--- a/views/controls/button/native_button_win.h
+++ b/views/controls/button/native_button_win.h
@@ -1,6 +1,6 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
#ifndef VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WIN_H_
#define VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WIN_H_
@@ -49,6 +49,10 @@ class NativeButtonWin : public NativeControlWin,
// The NativeButton we are bound to.
NativeButton* native_button_;
+ // It's expensive to find the size of a button on windows, so we cache it.
+ mutable gfx::Size button_size_;
+ mutable bool button_size_valid_;
+
DISALLOW_COPY_AND_ASSIGN(NativeButtonWin);
};
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | views/controls/button/native_button_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698