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

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

Issue 45042: Fix for native button focus bug (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 Focus();
51 52
52 protected: 53 protected:
53 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); 54 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child);
54 virtual std::string GetClassName() const; 55 virtual std::string GetClassName() const;
55 virtual bool AcceleratorPressed(const Accelerator& accelerator); 56 virtual bool AcceleratorPressed(const Accelerator& accelerator);
56 57
57 // Create the button wrapper. Can be overridden by subclass to create a 58 // Create the button wrapper. Can be overridden by subclass to create a
58 // wrapper of a particular type. See NativeButtonWrapper interface for types. 59 // wrapper of a particular type. See NativeButtonWrapper interface for types.
59 virtual void CreateWrapper(); 60 virtual void CreateWrapper();
60 61
(...skipping 23 matching lines...) Expand all
84 // the width/height is non-zero, the preferred size of the button will not be 85 // the width/height is non-zero, the preferred size of the button will not be
85 // less than this value when the dialog units are converted to pixels. 86 // less than this value when the dialog units are converted to pixels.
86 gfx::Size minimum_size_; 87 gfx::Size minimum_size_;
87 88
88 DISALLOW_COPY_AND_ASSIGN(NativeButton); 89 DISALLOW_COPY_AND_ASSIGN(NativeButton);
89 }; 90 };
90 91
91 } // namespace views 92 } // namespace views
92 93
93 #endif // #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_H_ 94 #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