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

Side by Side Diff: Source/core/layout/LayoutFileUploadControl.h

Issue 1231363003: Fix virtual/override/final usage in Source/core/layout/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | « Source/core/layout/LayoutFieldset.h ('k') | Source/core/layout/LayoutFlexibleBox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 17 matching lines...) Expand all
28 28
29 class HTMLInputElement; 29 class HTMLInputElement;
30 30
31 // Each LayoutFileUploadControl contains a LayoutButton (for opening the file ch ooser), and 31 // Each LayoutFileUploadControl contains a LayoutButton (for opening the file ch ooser), and
32 // sufficient space to draw a file icon and filename. The LayoutButton has a sha dow node 32 // sufficient space to draw a file icon and filename. The LayoutButton has a sha dow node
33 // associated with it to receive click/hover events. 33 // associated with it to receive click/hover events.
34 34
35 class CORE_EXPORT LayoutFileUploadControl final : public LayoutBlockFlow { 35 class CORE_EXPORT LayoutFileUploadControl final : public LayoutBlockFlow {
36 public: 36 public:
37 LayoutFileUploadControl(HTMLInputElement*); 37 LayoutFileUploadControl(HTMLInputElement*);
38 virtual ~LayoutFileUploadControl(); 38 ~LayoutFileUploadControl() override;
39 39
40 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectFileUploadControl || LayoutBlockFlow::isOfType(type); } 40 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectFileUploadControl || LayoutBlockFlow::isOfType(type); }
41 41
42 String buttonValue(); 42 String buttonValue();
43 String fileTextValue() const; 43 String fileTextValue() const;
44 44
45 HTMLInputElement* uploadButton() const; 45 HTMLInputElement* uploadButton() const;
46 int uploadButtonWidth(); 46 int uploadButtonWidth();
47 47
48 static const int afterButtonSpacing = 4; 48 static const int afterButtonSpacing = 4;
49 49
50 virtual const char* name() const override { return "LayoutFileUploadControl" ; } 50 const char* name() const override { return "LayoutFileUploadControl"; }
51 51
52 private: 52 private:
53 virtual void updateFromElement() override; 53 void updateFromElement() override;
54 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo utUnit& maxLogicalWidth) const override; 54 void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const override;
55 virtual void computePreferredLogicalWidths() override; 55 void computePreferredLogicalWidths() override;
56 virtual void paintObject(const PaintInfo&, const LayoutPoint&) override; 56 void paintObject(const PaintInfo&, const LayoutPoint&) override;
57 57
58 int maxFilenameWidth() const; 58 int maxFilenameWidth() const;
59 59
60 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override; 60 PositionWithAffinity positionForPoint(const LayoutPoint&) override;
61 61
62 bool m_canReceiveDroppedFiles; 62 bool m_canReceiveDroppedFiles;
63 }; 63 };
64 64
65 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFileUploadControl, isFileUploadControl()); 65 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFileUploadControl, isFileUploadControl());
66 66
67 } // namespace blink 67 } // namespace blink
68 68
69 #endif // LayoutFileUploadControl_h 69 #endif // LayoutFileUploadControl_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutFieldset.h ('k') | Source/core/layout/LayoutFlexibleBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698