Commit 8adb84c8 authored by Darwin Huang's avatar Darwin Huang Committed by Commit Bot

ui/base/clipboard: Make ClipboardFormatType a class.

It's possible this should have been a struct when it was created, but that time
is long gone. ClipboardFormatType is now fairly complex and can hold multiple
private members. Therefore, as per the Style Guide[1], this should now be a
class instead of a struct.

[1]: https://google.github.io/styleguide/cppguide.html#Structs_vs._Classes

Change-Id: I3eab2fc75d9660fbc5aa05322df7d12034d113fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2020477Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarJarryd Goodman <jarrydg@chromium.org>
Commit-Queue: Darwin Huang <huangdarwin@chromium.org>
Auto-Submit: Darwin Huang <huangdarwin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736544}
parent bf24bd61
...@@ -73,7 +73,7 @@ class FullscreenOptions; ...@@ -73,7 +73,7 @@ class FullscreenOptions;
} // namespace blink } // namespace blink
namespace ui { namespace ui {
struct ClipboardFormatType; class ClipboardFormatType;
} }
namespace content { namespace content {
......
...@@ -168,7 +168,7 @@ class ResourceRequestBody; ...@@ -168,7 +168,7 @@ class ResourceRequestBody;
} // namespace network } // namespace network
namespace ui { namespace ui {
struct ClipboardFormatType; class ClipboardFormatType;
} }
namespace content { namespace content {
......
...@@ -158,7 +158,7 @@ class TargetPolicy; ...@@ -158,7 +158,7 @@ class TargetPolicy;
namespace ui { namespace ui {
class SelectFilePolicy; class SelectFilePolicy;
struct ClipboardFormatType; class ClipboardFormatType;
} // namespace ui } // namespace ui
namespace url { namespace url {
......
...@@ -29,7 +29,8 @@ namespace ui { ...@@ -29,7 +29,8 @@ namespace ui {
// Platform neutral holder for native data representation of a clipboard type. // Platform neutral holder for native data representation of a clipboard type.
// Copyable and assignable, since this is an opaque value type. // Copyable and assignable, since this is an opaque value type.
struct COMPONENT_EXPORT(UI_BASE_CLIPBOARD_TYPES) ClipboardFormatType { class COMPONENT_EXPORT(UI_BASE_CLIPBOARD_TYPES) ClipboardFormatType {
public:
ClipboardFormatType(); ClipboardFormatType();
~ClipboardFormatType(); ~ClipboardFormatType();
...@@ -105,7 +106,6 @@ struct COMPONENT_EXPORT(UI_BASE_CLIPBOARD_TYPES) ClipboardFormatType { ...@@ -105,7 +106,6 @@ struct COMPONENT_EXPORT(UI_BASE_CLIPBOARD_TYPES) ClipboardFormatType {
private: private:
friend class base::NoDestructor<ClipboardFormatType>; friend class base::NoDestructor<ClipboardFormatType>;
friend class Clipboard; friend class Clipboard;
friend struct ClipboardFormatType;
// Platform-specific glue used internally by the ClipboardFormatType struct. // Platform-specific glue used internally by the ClipboardFormatType struct.
// Each platform should define at least one of each of the following: // Each platform should define at least one of each of the following:
......
...@@ -35,7 +35,7 @@ class Vector2d; ...@@ -35,7 +35,7 @@ class Vector2d;
namespace ui { namespace ui {
struct ClipboardFormatType; class ClipboardFormatType;
struct FileInfo; struct FileInfo;
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
namespace ui { namespace ui {
struct ClipboardFormatType; class ClipboardFormatType;
// OSExchangeData::Provider implementation for aura on linux. // OSExchangeData::Provider implementation for aura on linux.
class UI_BASE_EXPORT OSExchangeDataProviderAura class UI_BASE_EXPORT OSExchangeDataProviderAura
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment