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

Side by Side Diff: chrome/views/controls/button/native_button.h

Issue 42582: Making the enabled and visible states work in native buttons (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
« no previous file with comments | « no previous file | chrome/views/controls/button/native_button.cc » ('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) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_ 5 #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_
6 #define CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_ 6 #define CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_
7 7
8 #include "chrome/common/gfx/chrome_font.h" 8 #include "chrome/common/gfx/chrome_font.h"
9 #include "chrome/views/controls/button/button.h" 9 #include "chrome/views/controls/button/button.h"
10 #include "chrome/views/controls/button/native_button_wrapper.h" 10 #include "chrome/views/controls/button/native_button_wrapper.h"
(...skipping 30 matching lines...) Expand all
41 void set_ignore_minimum_size(bool ignore_minimum_size) { 41 void set_ignore_minimum_size(bool ignore_minimum_size) {
42 ignore_minimum_size_ = ignore_minimum_size; 42 ignore_minimum_size_ = ignore_minimum_size;
43 } 43 }
44 44
45 // Called by the wrapper when the actual wrapped native button was pressed. 45 // Called by the wrapper when the actual wrapped native button was pressed.
46 void ButtonPressed(); 46 void ButtonPressed();
47 47
48 // Overridden from View: 48 // Overridden from View:
49 virtual gfx::Size GetPreferredSize(); 49 virtual gfx::Size GetPreferredSize();
50 virtual void Layout(); 50 virtual void Layout();
51 virtual void SetEnabled(bool flag);
51 virtual void Focus(); 52 virtual void Focus();
52 53
53 protected: 54 protected:
54 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); 55 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child);
55 virtual std::string GetClassName() const; 56 virtual std::string GetClassName() const;
56 virtual bool AcceleratorPressed(const Accelerator& accelerator); 57 virtual bool AcceleratorPressed(const Accelerator& accelerator);
57 58
58 // Create the button wrapper. Can be overridden by subclass to create a 59 // Create the button wrapper. Can be overridden by subclass to create a
59 // wrapper of a particular type. See NativeButtonWrapper interface for types. 60 // wrapper of a particular type. See NativeButtonWrapper interface for types.
60 virtual void CreateWrapper(); 61 virtual void CreateWrapper();
(...skipping 24 matching lines...) Expand all
85 // the width/height is non-zero, the preferred size of the button will not be 86 // the width/height is non-zero, the preferred size of the button will not be
86 // less than this value when the dialog units are converted to pixels. 87 // less than this value when the dialog units are converted to pixels.
87 gfx::Size minimum_size_; 88 gfx::Size minimum_size_;
88 89
89 DISALLOW_COPY_AND_ASSIGN(NativeButton); 90 DISALLOW_COPY_AND_ASSIGN(NativeButton);
90 }; 91 };
91 92
92 } // namespace views 93 } // namespace views
93 94
94 #endif // #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_ 95 #endif // #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/views/controls/button/native_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698