diff options
author | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-13 18:54:18 +0000 |
---|---|---|
committer | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-13 18:54:18 +0000 |
commit | 009266504f0b83aa61cbf91c4ed29c429f7674c2 (patch) | |
tree | 8d363b1f43739f9564ea18ee1d4ee15e94fe2cc1 | |
parent | 202c345e0c2e42241fb7f3d6380955d9475a414c (diff) | |
download | chromium_src-009266504f0b83aa61cbf91c4ed29c429f7674c2.zip chromium_src-009266504f0b83aa61cbf91c4ed29c429f7674c2.tar.gz chromium_src-009266504f0b83aa61cbf91c4ed29c429f7674c2.tar.bz2 |
Remove unused and unnecessary constructor from PlatformFont classes.
These are not used by Font since it keeps a scoped_refptr to PlatformFont.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/10081007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132229 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ui/gfx/platform_font.h | 1 | ||||
-rw-r--r-- | ui/gfx/platform_font_android.cc | 6 | ||||
-rw-r--r-- | ui/gfx/platform_font_mac.h | 1 | ||||
-rw-r--r-- | ui/gfx/platform_font_mac.mm | 8 | ||||
-rw-r--r-- | ui/gfx/platform_font_pango.cc | 10 | ||||
-rw-r--r-- | ui/gfx/platform_font_pango.h | 1 | ||||
-rw-r--r-- | ui/gfx/platform_font_win.cc | 9 | ||||
-rw-r--r-- | ui/gfx/platform_font_win.h | 1 |
8 files changed, 0 insertions, 37 deletions
diff --git a/ui/gfx/platform_font.h b/ui/gfx/platform_font.h index b90d05b..e4e8767 100644 --- a/ui/gfx/platform_font.h +++ b/ui/gfx/platform_font.h @@ -21,7 +21,6 @@ class UI_EXPORT PlatformFont : public base::RefCounted<PlatformFont> { public: // Creates an appropriate PlatformFont implementation. static PlatformFont* CreateDefault(); - static PlatformFont* CreateFromFont(const Font& other); static PlatformFont* CreateFromNativeFont(NativeFont native_font); // Creates a PlatformFont implementation with the specified |font_name| // (encoded in UTF-8) and |font_size| in pixels. diff --git a/ui/gfx/platform_font_android.cc b/ui/gfx/platform_font_android.cc index 3a972a3..332a078 100644 --- a/ui/gfx/platform_font_android.cc +++ b/ui/gfx/platform_font_android.cc @@ -15,12 +15,6 @@ PlatformFont* PlatformFont::CreateDefault() { } // static -PlatformFont* PlatformFont::CreateFromFont(const Font& other) { - NOTIMPLEMENTED(); - return NULL; -} - -// static PlatformFont* PlatformFont::CreateFromNativeFont(NativeFont native_font) { NOTIMPLEMENTED(); return NULL; diff --git a/ui/gfx/platform_font_mac.h b/ui/gfx/platform_font_mac.h index 6e89cb3..f0001b9 100644 --- a/ui/gfx/platform_font_mac.h +++ b/ui/gfx/platform_font_mac.h @@ -14,7 +14,6 @@ namespace gfx { class PlatformFontMac : public PlatformFont { public: PlatformFontMac(); - explicit PlatformFontMac(const Font& other); explicit PlatformFontMac(NativeFont native_font); PlatformFontMac(const std::string& font_name, int font_size); diff --git a/ui/gfx/platform_font_mac.mm b/ui/gfx/platform_font_mac.mm index 3670a0b..8bd4bf6 100644 --- a/ui/gfx/platform_font_mac.mm +++ b/ui/gfx/platform_font_mac.mm @@ -26,9 +26,6 @@ PlatformFontMac::PlatformFontMac() { CalculateMetrics(); } -PlatformFontMac::PlatformFontMac(const Font& other) { -} - PlatformFontMac::PlatformFontMac(NativeFont native_font) { } @@ -122,11 +119,6 @@ PlatformFont* PlatformFont::CreateDefault() { } // static -PlatformFont* PlatformFont::CreateFromFont(const Font& other) { - return new PlatformFontMac(other); -} - -// static PlatformFont* PlatformFont::CreateFromNativeFont(NativeFont native_font) { return new PlatformFontMac(native_font); } diff --git a/ui/gfx/platform_font_pango.cc b/ui/gfx/platform_font_pango.cc index fe4d4e68..c70809c 100644 --- a/ui/gfx/platform_font_pango.cc +++ b/ui/gfx/platform_font_pango.cc @@ -110,11 +110,6 @@ PlatformFontPango::PlatformFontPango() { static_cast<PlatformFontPango*>(default_font_->platform_font())); } -PlatformFontPango::PlatformFontPango(const Font& other) { - InitFromPlatformFont( - static_cast<PlatformFontPango*>(other.platform_font())); -} - PlatformFontPango::PlatformFontPango(NativeFont native_font) { std::vector<std::string> family_names; base::SplitString(pango_font_description_get_family(native_font), ',', @@ -391,11 +386,6 @@ PlatformFont* PlatformFont::CreateDefault() { } // static -PlatformFont* PlatformFont::CreateFromFont(const Font& other) { - return new PlatformFontPango(other); -} - -// static PlatformFont* PlatformFont::CreateFromNativeFont(NativeFont native_font) { return new PlatformFontPango(native_font); } diff --git a/ui/gfx/platform_font_pango.h b/ui/gfx/platform_font_pango.h index 7e154f5..88cb612 100644 --- a/ui/gfx/platform_font_pango.h +++ b/ui/gfx/platform_font_pango.h @@ -19,7 +19,6 @@ namespace gfx { class UI_EXPORT PlatformFontPango : public PlatformFont { public: PlatformFontPango(); - explicit PlatformFontPango(const Font& other); explicit PlatformFontPango(NativeFont native_font); PlatformFontPango(const std::string& font_name, int font_size); diff --git a/ui/gfx/platform_font_win.cc b/ui/gfx/platform_font_win.cc index d89ee9a..174ff13 100644 --- a/ui/gfx/platform_font_win.cc +++ b/ui/gfx/platform_font_win.cc @@ -66,10 +66,6 @@ PlatformFontWin::GetMinimumFontSizeCallback PlatformFontWin::PlatformFontWin() : font_ref_(GetBaseFontRef()) { } -PlatformFontWin::PlatformFontWin(const Font& other) { - InitWithCopyOfHFONT(other.GetNativeFont()); -} - PlatformFontWin::PlatformFontWin(NativeFont native_font) { InitWithCopyOfHFONT(native_font); } @@ -269,11 +265,6 @@ PlatformFont* PlatformFont::CreateDefault() { } // static -PlatformFont* PlatformFont::CreateFromFont(const Font& other) { - return new PlatformFontWin(other); -} - -// static PlatformFont* PlatformFont::CreateFromNativeFont(NativeFont native_font) { return new PlatformFontWin(native_font); } diff --git a/ui/gfx/platform_font_win.h b/ui/gfx/platform_font_win.h index ffdde09..46d29f7 100644 --- a/ui/gfx/platform_font_win.h +++ b/ui/gfx/platform_font_win.h @@ -18,7 +18,6 @@ namespace gfx { class UI_EXPORT PlatformFontWin : public PlatformFont { public: PlatformFontWin(); - explicit PlatformFontWin(const Font& other); explicit PlatformFontWin(NativeFont native_font); PlatformFontWin(const std::string& font_name, int font_size); |