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

Unified Diff: ui/gfx/render_text.cc

Issue 891013003: Delete RenderTextWin and RenderTextPango. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update switch comment Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/render_text.h ('k') | ui/gfx/render_text_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text.cc
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
index 59742ccb367188423cb4a85b5c7e2eafb7aa03d8..9ef575018ff9934f077759c35d2edf43e8759211 100644
--- a/ui/gfx/render_text.cc
+++ b/ui/gfx/render_text.cc
@@ -28,6 +28,10 @@
#include "ui/gfx/text_utils.h"
#include "ui/gfx/utf16_indexing.h"
+#if defined(OS_MACOSX)
+#include "ui/gfx/render_text_mac.h"
+#endif // defined(OS_MACOSX)
+
namespace gfx {
namespace {
@@ -400,22 +404,17 @@ RenderText::~RenderText() {
RenderText* RenderText::CreateInstance() {
#if defined(OS_MACOSX)
- static const bool use_harfbuzz =
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableHarfBuzzRenderText);
-#else
- static const bool use_harfbuzz =
+ static const bool use_native =
!base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableHarfBuzzRenderText);
-#endif
- return use_harfbuzz ? new RenderTextHarfBuzz : CreateNativeInstance();
+ switches::kEnableHarfBuzzRenderText);
+ if (use_native)
+ return new RenderTextMac;
+#endif // defined(OS_MACOSX)
+ return new RenderTextHarfBuzz;
}
RenderText* RenderText::CreateInstanceForEditing() {
- static const bool use_harfbuzz =
- !base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableHarfBuzzRenderText);
- return use_harfbuzz ? new RenderTextHarfBuzz : CreateNativeInstance();
+ return new RenderTextHarfBuzz;
}
void RenderText::SetText(const base::string16& text) {
« no previous file with comments | « ui/gfx/render_text.h ('k') | ui/gfx/render_text_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698