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

Unified Diff: content/renderer/render_widget.cc

Issue 2512563003: Convert enable_plugins to a buildflag header. (Closed)
Patch Set: Merge Created 4 years, 1 month 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 | « content/renderer/render_view_impl.cc ('k') | content/renderer/renderer_blink_platform_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index dc1f14d8a538aa4db7acaddb94aac06061415076..2d27a73bd52c0b5f31f1ef5b3fdbee254a315783 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -59,6 +59,7 @@
#include "content/renderer/resizing_mode_selector.h"
#include "ipc/ipc_message_start.h"
#include "ipc/ipc_sync_message.h"
+#include "ppapi/features/features.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/public/platform/WebCursorInfo.h"
#include "third_party/WebKit/public/platform/WebDragData.h"
@@ -1516,7 +1517,7 @@ void RenderWidget::OnImeSetComposition(
const std::vector<WebCompositionUnderline>& underlines,
const gfx::Range& replacement_range,
int selection_start, int selection_end) {
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
if (focused_pepper_plugin_) {
focused_pepper_plugin_->render_frame()->OnImeSetComposition(
text, underlines, selection_start, selection_end);
@@ -1548,7 +1549,7 @@ void RenderWidget::OnImeSetComposition(
void RenderWidget::OnImeCommitText(const base::string16& text,
const gfx::Range& replacement_range,
int relative_cursor_pos) {
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
if (focused_pepper_plugin_) {
focused_pepper_plugin_->render_frame()->OnImeCommitText(
text, replacement_range, relative_cursor_pos);
@@ -1571,7 +1572,7 @@ void RenderWidget::OnImeCommitText(const base::string16& text,
}
void RenderWidget::OnImeFinishComposingText(bool keep_selection) {
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
if (focused_pepper_plugin_) {
focused_pepper_plugin_->render_frame()->OnImeFinishComposingText(
keep_selection);
@@ -1738,7 +1739,7 @@ void RenderWidget::showImeIfNeeded() {
}
ui::TextInputType RenderWidget::GetTextInputType() {
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
if (focused_pepper_plugin_)
return focused_pepper_plugin_->text_input_type();
#endif
@@ -1952,7 +1953,7 @@ void RenderWidget::OnImeEventGuardFinish(ImeEventGuard* guard) {
}
void RenderWidget::GetSelectionBounds(gfx::Rect* focus, gfx::Rect* anchor) {
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
if (focused_pepper_plugin_) {
// TODO(kinaba) http://crbug.com/101101
// Current Pepper IME API does not handle selection bounds. So we simply
@@ -2042,7 +2043,7 @@ void RenderWidget::GetCompositionCharacterBounds(
DCHECK(bounds);
bounds->clear();
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
if (focused_pepper_plugin_)
return;
#endif
@@ -2060,7 +2061,7 @@ void RenderWidget::GetCompositionCharacterBounds(
}
void RenderWidget::GetCompositionRange(gfx::Range* range) {
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
if (focused_pepper_plugin_)
return;
#endif
@@ -2088,7 +2089,7 @@ bool RenderWidget::ShouldUpdateCompositionInfo(
}
bool RenderWidget::CanComposeInline() {
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
if (focused_pepper_plugin_)
return focused_pepper_plugin_->IsPluginAcceptingCompositionEvents();
#endif
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/renderer_blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698