summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-05 00:21:22 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-05 00:21:22 +0000
commita13283ccd0eef981bd92b5ba3b78c7d1b4a678f5 (patch)
tree2cb114cfcd3d89203d045c56ec2af4d2d52cf9b0
parentb09be0a7dace2e86516a2661c9c504d640abed7c (diff)
downloadchromium_src-a13283ccd0eef981bd92b5ba3b78c7d1b4a678f5.zip
chromium_src-a13283ccd0eef981bd92b5ba3b78c7d1b4a678f5.tar.gz
chromium_src-a13283ccd0eef981bd92b5ba3b78c7d1b4a678f5.tar.bz2
Remove TOOLKIT_USES_GTK and consolidate it into TOOLKIT_GTK
Add gtk dependency to base.gyp for android host_os="linux" case BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/9969080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130784 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/base.gypi6
-rw-r--r--base/i18n/rtl.cc11
-rw-r--r--base/message_loop.cc5
-rw-r--r--base/message_pump_glib_unittest.cc8
-rw-r--r--base/nix/mime_util_xdg.cc8
-rw-r--r--base/nix/mime_util_xdg.h2
-rw-r--r--base/test/test_suite.cc6
-rw-r--r--build/common.gypi3
-rw-r--r--chrome/app/chrome_main_delegate.cc2
-rw-r--r--chrome/browser/browser_focus_uitest.cc2
-rw-r--r--chrome/browser/chrome_browser_main.cc2
-rw-r--r--chrome/browser/chrome_browser_main_posix.cc6
-rw-r--r--chrome/browser/chrome_content_browser_client.cc4
-rw-r--r--chrome/browser/chromeos/chrome_browser_main_chromeos.cc1
-rw-r--r--chrome/browser/defaults.cc4
-rw-r--r--chrome/browser/download/download_util.cc13
-rw-r--r--chrome/browser/extensions/extension_host.cc2
-rw-r--r--chrome/browser/icon_loader.cc4
-rw-r--r--chrome/browser/icon_loader.h4
-rw-r--r--chrome/browser/jankometer.cc4
-rw-r--r--chrome/browser/notifications/balloon_collection_impl.h2
-rw-r--r--chrome/browser/prefs/pref_service_unittest.cc2
-rw-r--r--chrome/browser/process_singleton_linux.cc4
-rw-r--r--chrome/browser/renderer_preferences_util.cc4
-rw-r--r--chrome/browser/repost_form_warning_controller.cc6
-rw-r--r--chrome/browser/repost_form_warning_controller.h4
-rw-r--r--chrome/browser/shell_integration_linux.cc2
-rw-r--r--chrome/browser/sync/glue/theme_util.cc2
-rw-r--r--chrome/browser/sync/glue/theme_util_unittest.cc2
-rw-r--r--chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc8
-rw-r--r--chrome/browser/themes/theme_service.h4
-rw-r--r--chrome/browser/themes/theme_service_factory.cc6
-rw-r--r--chrome/browser/ui/browser_init.cc7
-rw-r--r--chrome/browser/ui/omnibox/omnibox_view_browsertest.cc8
-rw-r--r--chrome/browser/ui/panels/panel_browser_frame_view.cc2
-rw-r--r--chrome/browser/ui/panels/panel_browser_frame_view.h2
-rw-r--r--chrome/browser/ui/panels/panel_browser_view_browsertest.cc2
-rw-r--r--chrome/browser/ui/tests/ui_gfx_image_unittest.cc4
-rw-r--r--chrome/browser/ui/toolbar/bookmark_sub_menu_model.h6
-rw-r--r--chrome/browser/ui/toolbar/wrench_menu_model.cc2
-rw-r--r--chrome/browser/ui/webui/bidi_checker_web_ui_test.cc6
-rw-r--r--chrome/browser/web_applications/web_app.cc2
-rw-r--r--chrome/browser/web_applications/web_app.h2
-rw-r--r--chrome/common/pref_names.cc2
-rw-r--r--chrome/common/pref_names.h2
-rw-r--r--chrome/service/service_process.cc4
-rw-r--r--chrome/test/perf/feature_startup_test.cc2
-rw-r--r--chrome/test/perf/startup_test.cc2
-rw-r--r--content/browser/browser_main_loop.cc2
-rw-r--r--content/browser/gpu/gpu_process_host.cc18
-rw-r--r--content/browser/gpu/gpu_process_host.h2
-rw-r--r--content/browser/gpu/gpu_process_host_ui_shim.cc8
-rw-r--r--content/browser/gpu/gpu_process_host_ui_shim.h2
-rw-r--r--content/browser/plugin_process_host.cc6
-rw-r--r--content/browser/renderer_host/render_process_host_impl.cc2
-rw-r--r--content/browser/renderer_host/render_widget_host_impl.cc8
-rw-r--r--content/browser/renderer_host/render_widget_host_impl.h6
-rw-r--r--content/browser/renderer_host/render_widget_host_view_base.cc2
-rw-r--r--content/browser/renderer_host/render_widget_host_view_base.h2
-rw-r--r--content/browser/renderer_host/test_render_view_host.cc6
-rw-r--r--content/browser/renderer_host/test_render_view_host.h10
-rw-r--r--content/browser/tab_contents/tab_contents.h2
-rw-r--r--content/gpu/gpu_main.cc4
-rw-r--r--content/plugin/plugin_thread.cc6
-rw-r--r--content/port/browser/render_widget_host_view_port.h4
-rw-r--r--content/public/browser/keyboard_listener.h8
-rw-r--r--content/public/browser/native_web_keyboard_event.h4
-rw-r--r--content/public/browser/render_widget_host_view.h10
-rw-r--r--content/public/browser/web_contents_view_delegate.h4
-rw-r--r--content/public/browser/web_drag_dest_delegate.h8
-rw-r--r--content/renderer/render_view_impl.cc6
-rw-r--r--content/renderer/webplugin_delegate_proxy.cc2
-rw-r--r--content/utility/utility_thread_impl.cc4
-rw-r--r--gpu/demos/framework/main_exe.cc8
-rw-r--r--gpu/gles2_conform_support/native/main.cc4
-rw-r--r--media/tools/shader_bench/shader_bench.cc4
-rw-r--r--remoting/host/remoting_me2me_host.cc6
-rw-r--r--remoting/host/simple_host_process.cc6
-rw-r--r--skia/ext/canvas_paint.h2
-rw-r--r--third_party/cld/base/build_config.h6
-rw-r--r--ui/base/accelerators/accelerator.cc4
-rw-r--r--ui/base/clipboard/clipboard.h8
-rw-r--r--ui/base/clipboard/clipboard_unittest.cc4
-rw-r--r--ui/base/clipboard/custom_data_helper.h2
-rw-r--r--ui/base/dragdrop/os_exchange_data.h4
-rw-r--r--ui/base/keycodes/keyboard_code_conversion_x.cc2
-rw-r--r--ui/base/resource/resource_bundle.h2
-rw-r--r--ui/base/x/events_x.cc17
-rw-r--r--ui/base/x/x11_util.cc10
-rw-r--r--ui/base/x/x11_util.h6
-rw-r--r--ui/gfx/compositor/test/test_compositor_host_linux.cc4
-rw-r--r--ui/gfx/image/image.cc22
-rw-r--r--ui/gfx/image/image.h8
-rw-r--r--ui/gfx/image/image_unittest.cc4
-rw-r--r--ui/gfx/image/image_unittest_util.cc2
-rw-r--r--ui/gfx/insets.h4
-rw-r--r--ui/gfx/native_widget_types.h6
-rw-r--r--ui/gfx/pango_util.cc4
-rw-r--r--ui/gfx/platform_font_pango.cc6
-rw-r--r--ui/gfx/rect.cc6
-rw-r--r--ui/gfx/rect.h8
-rw-r--r--webkit/glue/webcursor.h6
-rw-r--r--webkit/glue/webcursor_unittest.cc4
-rw-r--r--webkit/plugins/npapi/plugin_host.cc2
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl.h2
-rw-r--r--webkit/support/webkit_support.cc4
-rw-r--r--webkit/support/webkit_support.h2
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc2
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.h4
-rw-r--r--webkit/tools/test_shell/webview_host.h6
-rw-r--r--webkit/tools/test_shell/webwidget_host.h4
111 files changed, 243 insertions, 296 deletions
diff --git a/base/base.gypi b/base/base.gypi
index c1caecd..bc310e6 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -656,15 +656,17 @@
# hence the *_android.cc files are included but the actual code
# doesn't have OS_ANDROID / ANDROID defined.
'conditions': [
+ # Host build on linux depends on system.gyp::gtk as
+ # default linux build has TOOLKIT_GTK defined.
['host_os == "linux"', {
'sources/': [
['include', '^atomicops_internals_x86_gcc\\.cc$'],
],
'dependencies': [
- '../build/linux/system.gyp:glib',
+ '../build/linux/system.gyp:gtk',
],
'export_dependent_settings': [
- '../build/linux/system.gyp:glib',
+ '../build/linux/system.gyp:gtk',
],
}],
['host_os == "mac"', {
diff --git a/base/i18n/rtl.cc b/base/i18n/rtl.cc
index 779ac33..29a2a88 100644
--- a/base/i18n/rtl.cc
+++ b/base/i18n/rtl.cc
@@ -14,7 +14,7 @@
#include "unicode/uchar.h"
#include "unicode/uscript.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
#endif
@@ -100,15 +100,6 @@ void SetICUDefaultLocale(const std::string& locale_string) {
// it does not hurt to have it as a sanity check.
DCHECK(U_SUCCESS(error_code));
g_icu_text_direction = UNKNOWN_DIRECTION;
-
- // If we use Views toolkit on top of GtkWidget, then we need to keep
- // GtkWidget's default text direction consistent with ICU's text direction.
- // Because in this case ICU's text direction will be used instead.
- // See IsRTL() function below.
-#if defined(TOOLKIT_USES_GTK) && !defined(TOOLKIT_GTK)
- gtk_widget_set_default_direction(
- ICUIsRTL() ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
-#endif
}
bool IsRTL() {
diff --git a/base/message_loop.cc b/base/message_loop.cc
index cc7faa3..f60bf69 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -30,10 +30,11 @@
#if defined(OS_ANDROID)
#include "base/message_pump_android.h"
#endif
-#if defined(TOOLKIT_USES_GTK)
+
+#if defined(TOOLKIT_GTK)
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
-#endif // defined(OS_POSIX) && !defined(OS_MACOSX)
+#endif
using base::PendingTask;
using base::TimeDelta;
diff --git a/base/message_pump_glib_unittest.cc b/base/message_pump_glib_unittest.cc
index 550c0e7..f3df012 100644
--- a/base/message_pump_glib_unittest.cc
+++ b/base/message_pump_glib_unittest.cc
@@ -17,7 +17,7 @@
#include "base/threading/thread.h"
#include "testing/gtest/include/gtest/gtest.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
#endif
@@ -407,7 +407,7 @@ TEST_F(MessagePumpGLibTest, TestDrainingGLib) {
namespace {
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
void AddEventsAndDrainGtk(EventInjector* injector) {
// Add a couple of dummy events
injector->AddDummyEvent(0);
@@ -428,7 +428,7 @@ void AddEventsAndDrainGtk(EventInjector* injector) {
} // namespace
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
TEST_F(MessagePumpGLibTest, TestDrainingGtk) {
// Tests that draining events using Gtk works.
loop()->PostTask(
@@ -454,7 +454,7 @@ class GLibLoopRunner : public base::RefCounted<GLibLoopRunner> {
}
void RunLoop() {
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
while (!quit_) {
gtk_main_iteration();
}
diff --git a/base/nix/mime_util_xdg.cc b/base/nix/mime_util_xdg.cc
index 6cd5945..030c30c 100644
--- a/base/nix/mime_util_xdg.cc
+++ b/base/nix/mime_util_xdg.cc
@@ -23,7 +23,7 @@
#include "base/threading/thread_restrictions.h"
#include "base/time.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h> // NOLINT
#include "base/message_loop.h"
@@ -67,7 +67,7 @@ class MimeUtilConstants {
base::TimeTicks last_check_time_;
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// This is set by DetectGtkTheme(). We cache it so that we can access the
// theme name from threads that aren't allowed to call
// gtk_settings_get_default().
@@ -536,7 +536,7 @@ void InitDefaultThemes() {
default_themes[1] = IconTheme::LoadTheme(kde_default_theme);
default_themes[2] = IconTheme::LoadTheme(kde_fallback_theme);
} else {
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// Assume it's Gnome and use GTK to figure out the theme.
default_themes[1] = IconTheme::LoadTheme(
MimeUtilConstants::GetInstance()->gtk_theme_name_);
@@ -599,7 +599,7 @@ std::string GetDataMimeType(const std::string& data) {
return xdg_mime_get_mime_type_for_data(data.data(), data.length(), NULL);
}
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
void DetectGtkTheme() {
// If the theme name is already loaded, do nothing. Chrome doesn't respond
// to changes in the system theme, so we never need to set this more than
diff --git a/base/nix/mime_util_xdg.h b/base/nix/mime_util_xdg.h
index 94a6c06..e7d4046007 100644
--- a/base/nix/mime_util_xdg.h
+++ b/base/nix/mime_util_xdg.h
@@ -25,7 +25,7 @@ BASE_EXPORT std::string GetFileMimeType(const FilePath& filepath);
// Get the mime type for a byte vector.
BASE_EXPORT std::string GetDataMimeType(const std::string& data);
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// This detects the current GTK theme by calling gtk_settings_get_default().
// It should only be executed on the UI thread and must be called before
// GetMimeIcon().
diff --git a/base/test/test_suite.cc b/base/test/test_suite.cc
index 3416cd1..7df146f 100644
--- a/base/test/test_suite.cc
+++ b/base/test/test_suite.cc
@@ -31,7 +31,7 @@
#include "base/test/test_stub_android.h"
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
#endif
@@ -98,9 +98,9 @@ void TestSuite::PreInitialize(int argc, char** argv,
// have the locale set. In the absence of such a call the "C" locale is the
// default. In the gtk code (below) gtk_init() implicitly sets a locale.
setlocale(LC_ALL, "");
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
gtk_init_check(&argc, &argv);
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
if (create_at_exit_manager)
at_exit_manager_.reset(new base::AtExitManager);
diff --git a/build/common.gypi b/build/common.gypi
index 98d603e..500d8ac 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1175,9 +1175,6 @@
['enable_one_click_signin==1', {
'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
}],
- ['toolkit_uses_gtk==1', {
- 'defines': ['TOOLKIT_USES_GTK=1'],
- }],
['toolkit_uses_gtk==1 and toolkit_views==0', {
# TODO(erg): We are progressively sealing up use of deprecated features
# in gtk in preparation for an eventual porting to gtk3.
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index f689512..5a492d9 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -76,7 +76,7 @@
#include "chrome/browser/chromeos/boot_times_loader.h"
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gdk/gdk.h>
#include <glib.h>
#include <gtk/gtk.h>
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc
index 36ff11c..8f58d4d 100644
--- a/chrome/browser/browser_focus_uitest.cc
+++ b/chrome/browser/browser_focus_uitest.cc
@@ -42,7 +42,7 @@
#include "chrome/browser/ui/views/tab_contents/tab_contents_container.h"
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "chrome/browser/ui/gtk/view_id_util.h"
#endif
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 113192b..9b046f6 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -174,7 +174,7 @@
#include "ui/views/focus/accelerator_handler.h"
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "ui/gfx/gtk_util.h"
#endif
diff --git a/chrome/browser/chrome_browser_main_posix.cc b/chrome/browser/chrome_browser_main_posix.cc
index 9c2c710..71285a1 100644
--- a/chrome/browser/chrome_browser_main_posix.cc
+++ b/chrome/browser/chrome_browser_main_posix.cc
@@ -26,7 +26,7 @@
#include <asm/page.h> // for PAGE_SIZE needed by PTHREAD_STACK_MIN
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "chrome/browser/chrome_browser_main_extra_parts_gtk.h"
#include "chrome/browser/printing/print_dialog_gtk.h"
#endif
@@ -268,7 +268,7 @@ void ChromeBrowserMainPartsPosix::PostMainMessageLoopStart() {
action.sa_handler = SIGHUPHandler;
CHECK(sigaction(SIGHUP, &action, NULL) == 0);
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
printing::PrintingContextGtk::SetCreatePrintDialogFunction(
&PrintDialogGtk::CreatePrintDialog);
#endif
@@ -285,7 +285,7 @@ void ChromeBrowserMainPartsPosix::ShowMissingLocaleMessageBox() {
#elif defined(OS_MACOSX)
// Not called on Mac because we load the locale files differently.
NOTREACHED();
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
ChromeBrowserMainExtraPartsGtk::ShowMessageBox(
chrome_browser::kMissingLocaleDataMessage);
#elif defined(USE_AURA)
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 6c1cfbb..2685100 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -118,7 +118,7 @@
#include "chrome/browser/tab_contents/chrome_web_contents_view_delegate_views.h"
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "chrome/browser/chrome_browser_main_extra_parts_gtk.h"
#endif
@@ -343,7 +343,7 @@ content::BrowserMainParts* ChromeContentBrowserClient::CreateBrowserMainParts(
// Construct additional browser parts. Stages are called in the order in
// which they are added.
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
main_parts->AddParts(new ChromeBrowserMainExtraPartsGtk());
#endif
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
index beb6697..d3bf0e8 100644
--- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
+++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
@@ -283,7 +283,6 @@ void ChromeBrowserMainPartsChromeos::PostMainMessageLoopStart() {
chromeos::input_method::InputMethodManager::GetInstance()->
GetXKeyboard()->SetNumLockEnabled(true);
#endif
-
initial_browser_window_observer_.reset(
new chromeos::InitialBrowserWindowObserver);
}
diff --git a/chrome/browser/defaults.cc b/chrome/browser/defaults.cc
index 9487745..a2a3bf5 100644
--- a/chrome/browser/defaults.cc
+++ b/chrome/browser/defaults.cc
@@ -12,7 +12,7 @@ const bool kOSSupportsOtherBrowsers = false;
const bool kOSSupportsOtherBrowsers = true;
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
const bool kShowCancelButtonInTaskManager = true;
#else
const bool kShowCancelButtonInTaskManager = false;
@@ -36,7 +36,7 @@ const bool kSyncAutoStarts = true;
const bool kShowOtherBrowsersInAboutMemory = false;
const bool kAlwaysOpenIncognitoWindow = true;
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
// 14px = 10.5pt @ 96dpi.
const int kAutocompleteEditFontPixelSize = 14;
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc
index 5bfa4e2..6dda2c2 100644
--- a/chrome/browser/download/download_util.cc
+++ b/chrome/browser/download/download_util.cc
@@ -55,22 +55,15 @@
#if defined(TOOLKIT_VIEWS)
#include "ui/base/dragdrop/drag_utils.h"
#include "ui/base/dragdrop/os_exchange_data.h"
-#if !defined(TOOLKIT_USES_GTK)
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/gfx/screen.h"
#include "ui/views/widget/widget.h"
#endif
-#endif
-#if defined(TOOLKIT_USES_GTK)
-#if defined(TOOLKIT_VIEWS)
-#include "ui/base/dragdrop/drag_drop_types.h"
-#include "ui/views/widget/native_widget_gtk.h"
-#elif defined(TOOLKIT_GTK)
+#if defined(TOOLKIT_GTK)
#include "chrome/browser/ui/gtk/custom_drag.h"
#include "chrome/browser/ui/gtk/unity_service.h"
#endif // defined(TOOLKIT_GTK)
-#endif // defined(TOOLKIT_USES_GTK)
#if defined(OS_WIN) && !defined(USE_AURA)
#include "base/win/scoped_comptr.h"
@@ -396,7 +389,7 @@ void DragDownload(const DownloadItem* download,
download->GetFileNameToReportUser().LossyDisplayName());
}
-#if !defined(TOOLKIT_USES_GTK)
+#if !defined(TOOLKIT_GTK)
views::Widget* widget = views::Widget::GetWidgetForNativeView(view);
// TODO(varunjain): Widget should not be NULL here. But its causing the crash
// in http://code.google.com/p/chromium/issues/detail?id=120430 Find out why.
@@ -421,7 +414,7 @@ void DragDownload(const DownloadItem* download,
widget->DoDrag(data,
ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_LINK);
-#endif // TOOLKIT_USES_GTK
+#endif // TOOLKIT_GTK
}
#elif defined(USE_X11)
void DragDownload(const DownloadItem* download,
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 1413472..2a04646 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -166,7 +166,7 @@ void ExtensionHost::CreateView(Browser* browser) {
#elif defined(OS_MACOSX)
view_.reset(new ExtensionViewMac(this, browser));
view_->Init();
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
view_.reset(new ExtensionViewGtk(this, browser));
view_->Init();
#else
diff --git a/chrome/browser/icon_loader.cc b/chrome/browser/icon_loader.cc
index b51b2c9..f42292b 100644
--- a/chrome/browser/icon_loader.cc
+++ b/chrome/browser/icon_loader.cc
@@ -9,7 +9,7 @@
#include "content/public/browser/browser_thread.h"
#include "third_party/skia/include/core/SkBitmap.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "base/nix/mime_util_xdg.h"
#endif
@@ -30,7 +30,7 @@ IconLoader::~IconLoader() {
void IconLoader::Start() {
target_message_loop_ = base::MessageLoopProxy::current();
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// This call must happen on the UI thread before we can start loading icons.
base::nix::DetectGtkTheme();
#endif
diff --git a/chrome/browser/icon_loader.h b/chrome/browser/icon_loader.h
index 5053858..ea9337e 100644
--- a/chrome/browser/icon_loader.h
+++ b/chrome/browser/icon_loader.h
@@ -16,10 +16,6 @@
#include "base/message_loop_proxy.h"
#include "ui/gfx/image/image.h"
-#if defined(TOOLKIT_USES_GTK)
-#include "base/file_path.h"
-#endif
-
#if defined(OS_WIN)
// On Windows, we group files by their extension, with several exceptions:
// .dll, .exe, .ico. See IconManager.h for explanation.
diff --git a/chrome/browser/jankometer.cc b/chrome/browser/jankometer.cc
index d61212c..df1355b 100644
--- a/chrome/browser/jankometer.cc
+++ b/chrome/browser/jankometer.cc
@@ -22,7 +22,7 @@
#include "chrome/common/chrome_switches.h"
#include "content/public/browser/browser_thread.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "chrome/browser/ui/gtk/gtk_util.h"
#endif
@@ -339,7 +339,7 @@ class UIJankObserver : public base::RefCountedThreadSafe<UIJankObserver>,
virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE {
}
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
virtual void WillProcessEvent(GdkEvent* event) {
if (!helper_.MessageWillBeMeasured())
return;
diff --git a/chrome/browser/notifications/balloon_collection_impl.h b/chrome/browser/notifications/balloon_collection_impl.h
index 1e4ceb0..17804b9 100644
--- a/chrome/browser/notifications/balloon_collection_impl.h
+++ b/chrome/browser/notifications/balloon_collection_impl.h
@@ -67,7 +67,7 @@ class BalloonCollectionImpl : public BalloonCollection,
virtual base::EventStatus WillProcessEvent(
const base::NativeEvent& event) OVERRIDE;
virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE;
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
virtual void WillProcessEvent(GdkEvent* event) OVERRIDE;
virtual void DidProcessEvent(GdkEvent* event) OVERRIDE;
#endif
diff --git a/chrome/browser/prefs/pref_service_unittest.cc b/chrome/browser/prefs/pref_service_unittest.cc
index 9f99922..8a7069c 100644
--- a/chrome/browser/prefs/pref_service_unittest.cc
+++ b/chrome/browser/prefs/pref_service_unittest.cc
@@ -283,7 +283,7 @@ class PrefServiceWebKitPrefs : public ChromeRenderViewHostTestHarness {
// Set some (WebKit) user preferences.
TestingPrefService* pref_services = profile()->GetTestingPrefService();
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
pref_services->SetUserPref(prefs::kUsesSystemTheme,
Value::CreateBooleanValue(false));
#endif
diff --git a/chrome/browser/process_singleton_linux.cc b/chrome/browser/process_singleton_linux.cc
index 0fb297f..ea233be 100644
--- a/chrome/browser/process_singleton_linux.cc
+++ b/chrome/browser/process_singleton_linux.cc
@@ -43,7 +43,7 @@
#include <errno.h>
#include <fcntl.h>
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gdk/gdk.h>
#endif
#include <signal.h>
@@ -873,7 +873,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
// The other process is shutting down, it's safe to start a new process.
return PROCESS_NONE;
} else if (strncmp(buf, kACKToken, arraysize(kACKToken) - 1) == 0) {
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// Notify the window manager that we've started up; if we do not open a
// window, GTK will not automatically call this for us.
gdk_notify_startup_complete();
diff --git a/chrome/browser/renderer_preferences_util.cc b/chrome/browser/renderer_preferences_util.cc
index fd84a85..206a910 100644
--- a/chrome/browser/renderer_preferences_util.cc
+++ b/chrome/browser/renderer_preferences_util.cc
@@ -9,7 +9,7 @@
#include "chrome/common/pref_names.h"
#include "content/public/common/renderer_preferences.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/gtk/theme_service_gtk.h"
#endif
@@ -18,7 +18,7 @@ namespace renderer_preferences_util {
void UpdateFromSystemSettings(
content::RendererPreferences* prefs, Profile* profile) {
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
gtk_util::UpdateGtkFontSettings(prefs);
ThemeServiceGtk* theme_service = ThemeServiceGtk::GetFrom(profile);
diff --git a/chrome/browser/repost_form_warning_controller.cc b/chrome/browser/repost_form_warning_controller.cc
index 794d3a7..53eabd5 100644
--- a/chrome/browser/repost_form_warning_controller.cc
+++ b/chrome/browser/repost_form_warning_controller.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/repost_form_warning_controller.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
#endif
@@ -44,7 +44,7 @@ string16 RepostFormWarningController::GetAcceptButtonTitle() {
return l10n_util::GetStringUTF16(IDS_HTTP_POST_WARNING_RESEND);
}
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
const char* RepostFormWarningController::GetAcceptButtonIcon() {
return GTK_STOCK_REFRESH;
}
@@ -52,7 +52,7 @@ const char* RepostFormWarningController::GetAcceptButtonIcon() {
const char* RepostFormWarningController::GetCancelButtonIcon() {
return GTK_STOCK_CANCEL;
}
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
void RepostFormWarningController::OnAccepted() {
navigation_controller_->ContinuePendingReload();
diff --git a/chrome/browser/repost_form_warning_controller.h b/chrome/browser/repost_form_warning_controller.h
index 15bba70..917d89c 100644
--- a/chrome/browser/repost_form_warning_controller.h
+++ b/chrome/browser/repost_form_warning_controller.h
@@ -25,10 +25,10 @@ class RepostFormWarningController : public TabModalConfirmDialogDelegate {
virtual string16 GetTitle() OVERRIDE;
virtual string16 GetMessage() OVERRIDE;
virtual string16 GetAcceptButtonTitle() OVERRIDE;
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
virtual const char* GetAcceptButtonIcon() OVERRIDE;
virtual const char* GetCancelButtonIcon() OVERRIDE;
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
virtual void OnAccepted() OVERRIDE;
virtual void OnCanceled() OVERRIDE;
diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc
index d351c35..ccbca82 100644
--- a/chrome/browser/shell_integration_linux.cc
+++ b/chrome/browser/shell_integration_linux.cc
@@ -561,7 +561,7 @@ std::string ShellIntegration::GetDesktopFileContents(
if (!icon_name.empty())
g_key_file_set_string(key_file, kDesktopEntry, "Icon", icon_name.c_str());
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
std::string wmclass = web_app::GetWMClassFromAppName(app_name);
g_key_file_set_string(key_file, kDesktopEntry, "StartupWMClass",
wmclass.c_str());
diff --git a/chrome/browser/sync/glue/theme_util.cc b/chrome/browser/sync/glue/theme_util.cc
index b60b13e..7f0f00c 100644
--- a/chrome/browser/sync/glue/theme_util.cc
+++ b/chrome/browser/sync/glue/theme_util.cc
@@ -25,7 +25,7 @@ namespace {
// TODO(akalin): Remove this.
bool IsSystemThemeDistinctFromDefaultTheme() {
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
return true;
#else
return false;
diff --git a/chrome/browser/sync/glue/theme_util_unittest.cc b/chrome/browser/sync/glue/theme_util_unittest.cc
index 1721993..c895983 100644
--- a/chrome/browser/sync/glue/theme_util_unittest.cc
+++ b/chrome/browser/sync/glue/theme_util_unittest.cc
@@ -229,7 +229,7 @@ TEST_F(SyncThemeUtilTest, SetCurrentThemeIfNecessaryDefaultThemeNotNecessary) {
ThemeService::kDefaultThemeID));
EXPECT_CALL(*mock_theme_service, UseDefaultTheme()).Times(AnyNumber());
- // TODO(akalin): Mock out call to GetPrefs() under TOOLKIT_USES_GTK.
+ // TODO(akalin): Mock out call to GetPrefs() under TOOLKIT_GTK.
sync_pb::ThemeSpecifics theme_specifics;
SetCurrentThemeFromThemeSpecificsIfNecessary(theme_specifics,
diff --git a/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc b/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc
index 9ede498..1a85103 100644
--- a/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc
@@ -553,7 +553,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, kAcceptLanguages) {
}
// TCM ID - 7590682
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, kUsesSystemTheme) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
ASSERT_TRUE(BooleanPrefMatches(prefs::kUsesSystemTheme));
@@ -562,10 +562,10 @@ IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, kUsesSystemTheme) {
ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
ASSERT_FALSE(BooleanPrefMatches(prefs::kUsesSystemTheme));
}
-#endif // TOOLKIT_USES_GTK
+#endif // TOOLKIT_GTK
// TCM ID - 3636292
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest,
kUseCustomChromeFrame) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
@@ -577,7 +577,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest,
ASSERT_TRUE(BooleanPrefMatches(
prefs::kUseCustomChromeFrame));
}
-#endif // TOOLKIT_USES_GTK
+#endif // TOOLKIT_GTK
// TCM ID - 6473347.
#if defined(OS_CHROMEOS)
diff --git a/chrome/browser/themes/theme_service.h b/chrome/browser/themes/theme_service.h
index c23f90e..19d454a 100644
--- a/chrome/browser/themes/theme_service.h
+++ b/chrome/browser/themes/theme_service.h
@@ -282,12 +282,12 @@ class ThemeService : public base::NonThreadSafe,
// case we don't have a theme pack).
void BuildFromExtension(const Extension* extension);
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// Loads an image and flips it horizontally if |rtl_enabled| is true.
GdkPixbuf* GetPixbufImpl(int id, bool rtl_enabled) const;
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
typedef std::map<int, GdkPixbuf*> GdkPixbufMap;
mutable GdkPixbufMap gdk_pixbufs_;
#elif defined(OS_MACOSX)
diff --git a/chrome/browser/themes/theme_service_factory.cc b/chrome/browser/themes/theme_service_factory.cc
index b510734..36b0c6b 100644
--- a/chrome/browser/themes/theme_service_factory.cc
+++ b/chrome/browser/themes/theme_service_factory.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/themes/theme_service.h"
#include "chrome/common/pref_names.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "chrome/browser/ui/gtk/theme_service_gtk.h"
#endif
@@ -46,7 +46,7 @@ ThemeServiceFactory::~ThemeServiceFactory() {}
ProfileKeyedService* ThemeServiceFactory::BuildServiceInstanceFor(
Profile* profile) const {
ThemeService* provider = NULL;
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
provider = new ThemeServiceGtk;
#else
provider = new ThemeService;
@@ -57,7 +57,7 @@ ProfileKeyedService* ThemeServiceFactory::BuildServiceInstanceFor(
}
void ThemeServiceFactory::RegisterUserPrefs(PrefService* prefs) {
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
prefs->RegisterBooleanPref(prefs::kUsesSystemTheme,
ThemeServiceGtk::DefaultUsesSystemTheme(),
PrefService::UNSYNCABLE_PREF);
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc
index a14e95ee..5dcd96eb 100644
--- a/chrome/browser/ui/browser_init.cc
+++ b/chrome/browser/ui/browser_init.cc
@@ -106,7 +106,7 @@
#include "chrome/browser/ui/cocoa/keystone_infobar_delegate.h"
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "chrome/browser/ui/gtk/gtk_util.h"
#endif
@@ -120,9 +120,6 @@
#include "chrome/browser/chromeos/network_message_observer.h"
#include "chrome/browser/chromeos/power/low_battery_observer.h"
#include "chrome/browser/chromeos/sms_observer.h"
-#if defined(TOOLKIT_USES_GTK)
-#include "chrome/browser/chromeos/legacy_window_manager/wm_message_listener.h"
-#endif
#endif
#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX)
@@ -1422,7 +1419,7 @@ bool LearnMoreInfoBar::LinkClicked(WindowOpenDisposition disposition) {
void BrowserInit::LaunchWithProfile::AddObsoleteSystemInfoBarIfNecessary(
TabContentsWrapper* tab) {
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// We've deprecated support for Ubuntu Hardy. Rather than attempting to
// determine whether you're using that, we instead key off the GTK version;
// this will also deprecate other distributions (including variants of Ubuntu)
diff --git a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
index 523ac9a..3a1cf30 100644
--- a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
+++ b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
@@ -37,7 +37,7 @@
#include "ui/base/events.h"
#include "ui/base/keycodes/keyboard_codes.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#endif
@@ -118,7 +118,7 @@ const struct TestHistoryEntry {
{"http://bar/", "Bar", kSearchText, 1, 0, false },
};
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// Returns the text stored in the PRIMARY clipboard.
std::string GetPrimarySelectionText() {
GtkClipboard* clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
@@ -1356,9 +1356,9 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewTest,
CtrlKeyPressedWithInlineAutocompleteTest();
}
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// TODO(oshima): enable these tests for views-implmentation when
-// these featuers are supported.
+// these featuers are supported. http://crbug.com/121558.
IN_PROC_BROWSER_TEST_F(OmniboxViewTest, UndoRedoLinux) {
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kAboutBlankURL));
diff --git a/chrome/browser/ui/panels/panel_browser_frame_view.cc b/chrome/browser/ui/panels/panel_browser_frame_view.cc
index 05ee336..3ec4af8 100644
--- a/chrome/browser/ui/panels/panel_browser_frame_view.cc
+++ b/chrome/browser/ui/panels/panel_browser_frame_view.cc
@@ -333,7 +333,7 @@ void PanelBrowserFrameView::MouseWatcher::DidProcessEvent(
if (ui::IsMotionEvent(event))
HandleGlobalMouseMoveEvent();
}
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
void PanelBrowserFrameView::MouseWatcher::WillProcessEvent(GdkEvent* event) {
}
diff --git a/chrome/browser/ui/panels/panel_browser_frame_view.h b/chrome/browser/ui/panels/panel_browser_frame_view.h
index 7118800..91b5dff 100644
--- a/chrome/browser/ui/panels/panel_browser_frame_view.h
+++ b/chrome/browser/ui/panels/panel_browser_frame_view.h
@@ -125,7 +125,7 @@ class PanelBrowserFrameView : public BrowserNonClientFrameView,
virtual base::EventStatus WillProcessEvent(
const base::NativeEvent& event) OVERRIDE;
virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE;
- #elif defined(TOOLKIT_USES_GTK)
+ #elif defined(TOOLKIT_GTK)
virtual void WillProcessEvent(GdkEvent* event) OVERRIDE;
virtual void DidProcessEvent(GdkEvent* event) OVERRIDE;
#endif
diff --git a/chrome/browser/ui/panels/panel_browser_view_browsertest.cc b/chrome/browser/ui/panels/panel_browser_view_browsertest.cc
index 1f7bcc5..425dfd5 100644
--- a/chrome/browser/ui/panels/panel_browser_view_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_browser_view_browsertest.cc
@@ -54,7 +54,7 @@ class PanelBrowserViewTest : public BasePanelBrowserTest {
DidProcessEvent(msg);
#elif defined(USE_AURA)
NOTIMPLEMENTED();
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
GdkEvent event;
event.type = GDK_MOTION_NOTIFY;
DidProcessEvent(&event);
diff --git a/chrome/browser/ui/tests/ui_gfx_image_unittest.cc b/chrome/browser/ui/tests/ui_gfx_image_unittest.cc
index 6e0fe52..6640a63 100644
--- a/chrome/browser/ui/tests/ui_gfx_image_unittest.cc
+++ b/chrome/browser/ui/tests/ui_gfx_image_unittest.cc
@@ -8,7 +8,7 @@
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_unittest_util.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
#include "ui/gfx/gtk_util.h"
@@ -35,7 +35,7 @@ TEST(UiGfxImageTest, ViewsImageView) {
}
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
TEST(UiGfxImageTest, GtkImageView) {
GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_resize(GTK_WINDOW(window), 200, 200);
diff --git a/chrome/browser/ui/toolbar/bookmark_sub_menu_model.h b/chrome/browser/ui/toolbar/bookmark_sub_menu_model.h
index 5223ff5..efe83e6 100644
--- a/chrome/browser/ui/toolbar/bookmark_sub_menu_model.h
+++ b/chrome/browser/ui/toolbar/bookmark_sub_menu_model.h
@@ -12,11 +12,11 @@
// For the time being on GTK systems, we have a dedicated bookmark menu model in
// chrome/browser/ui/gtk/bookmark_sub_menu_model_gtk.h instead.
-#if defined(TOOLKIT_USES_GTK) && !defined(TOOLKIT_VIEWS)
+#if defined(TOOLKIT_GTK)
#include "chrome/browser/ui/gtk/bookmarks/bookmark_sub_menu_model_gtk.h"
-#else // defined(TOOLKIT_USES_GTK) && !defined(TOOLKIT_VIEWS)
+#else // defined(TOOLKIT_GTK)
#include "ui/base/models/simple_menu_model.h"
@@ -34,6 +34,6 @@ class BookmarkSubMenuModel : public ui::SimpleMenuModel {
DISALLOW_COPY_AND_ASSIGN(BookmarkSubMenuModel);
};
-#endif // defined(TOOLKIT_USES_GTK) && !defined(TOOLKIT_VIEWS)
+#endif // defined(TOOLKIT_GTK)
#endif // CHROME_BROWSER_UI_TOOLBAR_BOOKMARK_SUB_MENU_MODEL_H_
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index 6e26295..28b53c1 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -50,7 +50,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
#include "chrome/browser/ui/gtk/gtk_util.h"
#endif
diff --git a/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc b/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc
index c6a2bbe..ac6bb95 100644
--- a/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc
+++ b/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc
@@ -22,7 +22,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "ui/base/resource/resource_bundle.h"
-#if defined(OS_POSIX) && defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
#endif
@@ -81,14 +81,14 @@ void WebUIBidiCheckerBrowserTestRTL::SetUpOnMainThread() {
ResourceBundle::GetSharedInstance().OverrideLocalePakForTest(pak_path);
ResourceBundle::GetSharedInstance().ReloadLocaleResources("he");
base::i18n::SetICUDefaultLocale("he");
-#if defined(OS_POSIX) && defined(TOOLKIT_USES_GTK)
+#if defined(OS_POSIX) && defined(TOOLKIT_GTK)
gtk_widget_set_default_direction(GTK_TEXT_DIR_RTL);
#endif
}
void WebUIBidiCheckerBrowserTestRTL::CleanUpOnMainThread() {
WebUIBidiCheckerBrowserTest::CleanUpOnMainThread();
-#if defined(OS_POSIX) && defined(TOOLKIT_USES_GTK)
+#if defined(OS_POSIX) && defined(TOOLKIT_GTK)
gtk_widget_set_default_direction(GTK_TEXT_DIR_LTR);
#endif
base::i18n::SetICUDefaultLocale(app_locale_);
diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc
index 575e72a..cbb169a 100644
--- a/chrome/browser/web_applications/web_app.cc
+++ b/chrome/browser/web_applications/web_app.cc
@@ -167,7 +167,7 @@ void GetIconsInfo(const WebApplicationInfo& app_info,
}
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
std::string GetWMClassFromAppName(std::string app_name) {
file_util::ReplaceIllegalCharactersInPath(&app_name, '_');
TrimString(app_name, "_", &app_name);
diff --git a/chrome/browser/web_applications/web_app.h b/chrome/browser/web_applications/web_app.h
index 4a6367f..cfdbdbd 100644
--- a/chrome/browser/web_applications/web_app.h
+++ b/chrome/browser/web_applications/web_app.h
@@ -65,7 +65,7 @@ void GetIconsInfo(const WebApplicationInfo& app_info,
IconInfoList* icons);
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// GTK+ windows that correspond to web apps need to have a deterministic (and
// different) WMClass than normal chrome windows so the window manager groups
// them as a separate application.
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index 705d748..137de2f 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -705,7 +705,7 @@ const char kSpeechInputTrayNotificationShown[] =
// Boolean controlling whether history saving is disabled.
const char kSavingBrowserHistoryDisabled[] = "history.saving_disabled";
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// GTK specific preference on whether we should match the system GTK theme.
const char kUsesSystemTheme[] = "extensions.theme.use_system";
#endif
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index e81f718..e89e15d 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -259,7 +259,7 @@ extern const char kEnabledLabsExperiments[];
extern const char kEnableAutoSpellCorrect[];
extern const char kSavingBrowserHistoryDisabled[];
extern const char kDeleteTimePeriod[];
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
extern const char kUsesSystemTheme[];
#endif
extern const char kCurrentThemePackFilename[];
diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc
index d747c93..1230716 100644
--- a/chrome/service/service_process.cc
+++ b/chrome/service/service_process.cc
@@ -34,7 +34,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_switches.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "ui/gfx/gtk_util.h"
#include <gtk/gtk.h>
#endif
@@ -124,7 +124,7 @@ ServiceProcess::ServiceProcess()
bool ServiceProcess::Initialize(MessageLoopForUI* message_loop,
const CommandLine& command_line,
ServiceProcessState* state) {
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// TODO(jamiewalch): Calling GtkInitFromCommandLine here causes the process
// to abort if run headless. The correct fix for this is to refactor the
// service process to be more modular, a task that is currently underway.
diff --git a/chrome/test/perf/feature_startup_test.cc b/chrome/test/perf/feature_startup_test.cc
index 01fcf4d..0e6130a 100644
--- a/chrome/test/perf/feature_startup_test.cc
+++ b/chrome/test/perf/feature_startup_test.cc
@@ -196,7 +196,7 @@ TEST_F(NewTabUIStartupTest, DISABLED_NewTabTimingTestsCold) {
RunNewTabTimingTest();
}
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
TEST_F(NewTabUIStartupTest, GtkThemeCold) {
RunStartupTest("tab_gtk_theme_cold", false /* cold */,
false /* not important */,
diff --git a/chrome/test/perf/startup_test.cc b/chrome/test/perf/startup_test.cc
index f4cdfa9..cf68f7a 100644
--- a/chrome/test/perf/startup_test.cc
+++ b/chrome/test/perf/startup_test.cc
@@ -442,7 +442,7 @@ TEST_F(StartupTest, MAYBE_PerfComplexTheme) {
UITestBase::COMPLEX_THEME, 0, 0);
}
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
TEST_F(StartupTest, PerfGtkTheme) {
RunStartupTest("warm", "gtk-theme", WARM, NOT_IMPORTANT,
UITestBase::NATIVE_THEME, 0, 0);
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 7b56d0e..95f8f25 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -66,7 +66,7 @@
#include <dbus/dbus-glib.h>
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "ui/gfx/gtk_util.h"
#endif
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 1308c45..eb94b03 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -36,7 +36,7 @@
#include "ui/gfx/gl/gl_implementation.h"
#include "ui/gfx/gl/gl_switches.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "ui/gfx/gtk_native_view_id_manager.h"
#endif
@@ -75,7 +75,7 @@ static const int kGpuMaxCrashCount = 3;
int g_last_host_id = 0;
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
void ReleasePermanentXIDDispatcher(gfx::PluginWindowHandle surface) {
GtkNativeViewManager* manager = GtkNativeViewManager::GetInstance();
@@ -120,7 +120,7 @@ void AcceleratedSurfaceBuffersSwappedCompleted(int host_id,
} // anonymous namespace
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// Used to put a lock on surfaces so that the window to which the GPU
// process is drawing to doesn't disappear while it is drawing when
// a tab is closed.
@@ -145,7 +145,7 @@ GpuProcessHost::SurfaceRef::~SurfaceRef() {
FROM_HERE,
base::Bind(&ReleasePermanentXIDDispatcher, surface_));
}
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
// This class creates a GPU thread (instead of a GPU process), when running
// with --in-process-gpu or --single-process.
@@ -478,7 +478,7 @@ void GpuProcessHost::CreateViewCommandBuffer(
const CreateCommandBufferCallback& callback) {
DCHECK(CalledOnValidThread());
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// There should only be one such command buffer (for the compositor). In
// practice, if the GPU process lost a context, GraphicsContext3D with
// associated command buffer and view surface will not be gone until new
@@ -489,13 +489,13 @@ void GpuProcessHost::CreateViewCommandBuffer(
surface_ref = (*it).second;
else
surface_ref.reset(new SurfaceRef(compositing_surface.handle));
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
if (!compositing_surface.is_null() &&
Send(new GpuMsg_CreateViewCommandBuffer(
compositing_surface, surface_id, client_id, init_params))) {
create_command_buffer_requests_.push(callback);
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
surface_refs_.insert(std::make_pair(surface_id, surface_ref));
#endif
} else {
@@ -545,11 +545,11 @@ void GpuProcessHost::OnCommandBufferCreated(const int32 route_id) {
}
void GpuProcessHost::OnDestroyCommandBuffer(int32 surface_id) {
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
SurfaceRefMap::iterator it = surface_refs_.find(surface_id);
if (it != surface_refs_.end())
surface_refs_.erase(it);
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
}
#if defined(OS_WIN) && !defined(USE_AURA)
diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h
index 6bc4a65..a2a2dc7 100644
--- a/content/browser/gpu/gpu_process_host.h
+++ b/content/browser/gpu/gpu_process_host.h
@@ -144,7 +144,7 @@ class GpuProcessHost : public content::BrowserChildProcessHostDelegate,
// The pending create command buffer requests we need to reply to.
std::queue<CreateCommandBufferCallback> create_command_buffer_requests_;
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// Encapsulates surfaces that we lock when creating view command buffers.
// We release this lock once the command buffer (or associated GPU process)
// is destroyed. This prevents the browser from destroying the surface
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc
index 8608ee5..53208f0 100644
--- a/content/browser/gpu/gpu_process_host_ui_shim.cc
+++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
@@ -23,7 +23,7 @@
#include "content/public/browser/browser_thread.h"
#include "ui/gfx/gl/gl_switches.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// These two #includes need to come after gpu_messages.h.
#include "ui/base/x/x11_util.h"
#include "ui/gfx/size.h"
@@ -198,7 +198,7 @@ bool GpuProcessHostUIShim::OnControlMessageReceived(
IPC_MESSAGE_HANDLER(GpuHostMsg_GraphicsInfoCollected,
OnGraphicsInfoCollected)
-#if defined(TOOLKIT_USES_GTK) || defined(OS_WIN)
+#if defined(TOOLKIT_GTK) || defined(OS_WIN)
IPC_MESSAGE_HANDLER(GpuHostMsg_ResizeView, OnResizeView)
#endif
@@ -238,7 +238,7 @@ void GpuProcessHostUIShim::OnGraphicsInfoCollected(
GpuDataManagerImpl::GetInstance()->UpdateGpuInfo(gpu_info);
}
-#if defined(TOOLKIT_USES_GTK) || defined(OS_WIN)
+#if defined(TOOLKIT_GTK) || defined(OS_WIN)
void GpuProcessHostUIShim::OnResizeView(int32 surface_id,
int32 route_id,
@@ -260,7 +260,7 @@ void GpuProcessHostUIShim::OnResizeView(int32 surface_id,
// Resize the window synchronously. The GPU process must not issue GL
// calls on the command buffer until the window is the size it expects it
// to be.
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
GdkWindow* window = reinterpret_cast<GdkWindow*>(
gdk_xid_table_lookup(surface.handle));
if (window) {
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.h b/content/browser/gpu/gpu_process_host_ui_shim.h
index c5da9ef..f99d532 100644
--- a/content/browser/gpu/gpu_process_host_ui_shim.h
+++ b/content/browser/gpu/gpu_process_host_ui_shim.h
@@ -82,7 +82,7 @@ class GpuProcessHostUIShim
void OnLogMessage(int level, const std::string& header,
const std::string& message);
-#if defined(TOOLKIT_USES_GTK) || defined(OS_WIN)
+#if defined(TOOLKIT_GTK) || defined(OS_WIN)
void OnResizeView(int32 surface_id,
int32 route_id,
gfx::Size size);
diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc
index 14ddbfe..f462a39 100644
--- a/content/browser/plugin_process_host.cc
+++ b/content/browser/plugin_process_host.cc
@@ -112,7 +112,7 @@ void PluginProcessHost::OnReportExecutableMemory(size_t size) {
}
#endif // defined(OS_WIN)
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
void PluginProcessHost::OnMapNativeViewId(gfx::NativeViewId id,
gfx::PluginWindowHandle* output) {
*output = 0;
@@ -120,7 +120,7 @@ void PluginProcessHost::OnMapNativeViewId(gfx::NativeViewId id,
GtkNativeViewManager::GetInstance()->GetXIDForId(output, id);
#endif
}
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
PluginProcessHost::PluginProcessHost()
#if defined(OS_MACOSX)
@@ -312,7 +312,7 @@ bool PluginProcessHost::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(PluginProcessHostMsg_ReportExecutableMemory,
OnReportExecutableMemory)
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
IPC_MESSAGE_HANDLER(PluginProcessHostMsg_MapNativeViewId,
OnMapNativeViewId)
#endif
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 57edc18..8454ae3 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -406,7 +406,7 @@ bool RenderProcessHostImpl::Init(bool is_accessibility_enabled) {
in_process_renderer_.reset(new RendererMainThread(channel_id));
base::Thread::Options options;
-#if !defined(TOOLKIT_USES_GTK)
+#if !defined(TOOLKIT_GTK)
// In-process plugins require this to be a UI message loop.
options.message_loop_type = MessageLoop::TYPE_UI;
#else
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 971ff8f..7476989 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -307,7 +307,7 @@ bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) {
IPC_MESSAGE_HANDLER(ViewHostMsg_AcceleratedSurfaceBuffersSwapped,
OnAcceleratedSurfaceBuffersSwapped)
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
IPC_MESSAGE_HANDLER(ViewHostMsg_CreatePluginContainer,
OnMsgCreatePluginContainer)
IPC_MESSAGE_HANDLER(ViewHostMsg_DestroyPluginContainer,
@@ -860,7 +860,7 @@ void RenderWidgetHostImpl::ForwardTouchEvent(
ForwardInputEvent(touch_event, sizeof(WebKit::WebTouchEvent), false);
}
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
bool RenderWidgetHostImpl::KeyPressListenersHandleEvent(GdkEventKey* event) {
if (event->type != GDK_KEY_PRESS)
return false;
@@ -873,7 +873,7 @@ bool RenderWidgetHostImpl::KeyPressListenersHandleEvent(GdkEventKey* event) {
return false;
}
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
void RenderWidgetHostImpl::AddKeyboardListener(KeyboardListener* listener) {
keyboard_listeners_.push_back(listener);
@@ -1547,7 +1547,7 @@ void RenderWidgetHostImpl::ActivateDeferredPluginHandles() {
return;
for (int i = 0; i < static_cast<int>(deferred_plugin_handles_.size()); i++) {
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
view_->CreatePluginContainer(deferred_plugin_handles_[i]);
#endif
}
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 7ccf1b5..ca16dbc5 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -211,11 +211,11 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
void ForwardGestureEvent(const WebKit::WebGestureEvent& gesture_event);
virtual void ForwardTouchEvent(const WebKit::WebTouchEvent& touch_event);
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// Give key press listeners a chance to handle this key press. This allow
// widgets that don't have focus to still handle key presses.
bool KeyPressListenersHandleEvent(GdkEventKey* event);
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
void CancelUpdateTextDirection();
@@ -493,7 +493,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
void OnAcceleratedSurfaceBuffersSwapped(gfx::PluginWindowHandle window,
uint64 surface_handle);
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
void OnMsgCreatePluginContainer(gfx::PluginWindowHandle id);
void OnMsgDestroyPluginContainer(gfx::PluginWindowHandle id);
#endif
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index d7760e9..28a45bb 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -9,7 +9,7 @@
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index 0136ab7..c6c4078 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -10,7 +10,7 @@
#include <OpenGL/OpenGL.h>
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gdk/gdk.h>
#endif
diff --git a/content/browser/renderer_host/test_render_view_host.cc b/content/browser/renderer_host/test_render_view_host.cc
index d9d059c..791fa17 100644
--- a/content/browser/renderer_host/test_render_view_host.cc
+++ b/content/browser/renderer_host/test_render_view_host.cc
@@ -169,17 +169,15 @@ gfx::Rect TestRenderWidgetHostView::GetRootWindowBounds() {
}
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
GdkEventButton* TestRenderWidgetHostView::GetLastMouseDown() {
return NULL;
}
-#if !defined(TOOLKIT_VIEWS)
gfx::NativeView TestRenderWidgetHostView::BuildInputMethodsGtkMenu() {
return NULL;
}
-#endif // !defined(TOOLKIT_VIEWS)
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
bool TestRenderWidgetHostView::CopyFromCompositingSurface(
const gfx::Size& size,
diff --git a/content/browser/renderer_host/test_render_view_host.h b/content/browser/renderer_host/test_render_view_host.h
index d222e98..365a05b 100644
--- a/content/browser/renderer_host/test_render_view_host.h
+++ b/content/browser/renderer_host/test_render_view_host.h
@@ -67,12 +67,10 @@ class TestRenderWidgetHostView : public RenderWidgetHostViewBase {
virtual void SetWindowVisibility(bool visible) OVERRIDE {}
virtual void WindowFrameChanged() OVERRIDE {}
#endif // defined(OS_MACOSX)
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
virtual GdkEventButton* GetLastMouseDown() OVERRIDE;
-#if !defined(TOOLKIT_VIEWS)
virtual gfx::NativeView BuildInputMethodsGtkMenu() OVERRIDE;
-#endif // !defined(TOOLKIT_VIEWS)
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
virtual bool CopyFromCompositingSurface(
const gfx::Size& size,
skia::PlatformCanvas* output) OVERRIDE;
@@ -151,10 +149,10 @@ class TestRenderWidgetHostView : public RenderWidgetHostViewBase {
virtual void AcceleratedSurfaceRelease(uint64 surface_id) OVERRIDE { }
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
virtual void CreatePluginContainer(gfx::PluginWindowHandle id) OVERRIDE { }
virtual void DestroyPluginContainer(gfx::PluginWindowHandle id) OVERRIDE { }
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
diff --git a/content/browser/tab_contents/tab_contents.h b/content/browser/tab_contents/tab_contents.h
index a155ad2..2fe0ec3 100644
--- a/content/browser/tab_contents/tab_contents.h
+++ b/content/browser/tab_contents/tab_contents.h
@@ -383,7 +383,7 @@ class CONTENT_EXPORT TabContents
friend class TabContentsViewViews;
#elif defined(OS_MACOSX)
friend class WebContentsViewMac;
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
friend class TabContentsViewGtk;
#endif
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index 09fce82..f62db1f 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -33,7 +33,7 @@
#include "ui/base/x/x11_util.h"
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "ui/gfx/gtk_util.h"
#endif
@@ -57,7 +57,7 @@ int GpuMain(const content::MainFunctionParams& parameters) {
#elif defined(USE_X11)
ui::SetDefaultX11ErrorHandlers();
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess());
#endif
}
diff --git a/content/plugin/plugin_thread.cc b/content/plugin/plugin_thread.cc
index b5fec37..9b88420 100644
--- a/content/plugin/plugin_thread.cc
+++ b/content/plugin/plugin_thread.cc
@@ -6,7 +6,7 @@
#include "build/build_config.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
#elif defined(OS_MACOSX)
#include <CoreFoundation/CoreFoundation.h>
@@ -31,7 +31,7 @@
#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "ui/gfx/gtk_util.h"
#endif
@@ -78,7 +78,7 @@ PluginThread::PluginThread()
lazy_tls.Pointer()->Set(this);
#if defined(USE_AURA)
// TODO(saintlou):
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
{
// XEmbed plugins assume they are hosted in a Gtk application, so we need
// to initialize Gtk in the plugin process.
diff --git a/content/port/browser/render_widget_host_view_port.h b/content/port/browser/render_widget_host_view_port.h
index 9f10d05..a45a214 100644
--- a/content/port/browser/render_widget_host_view_port.h
+++ b/content/port/browser/render_widget_host_view_port.h
@@ -210,10 +210,10 @@ class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView {
virtual void AcceleratedSurfaceRelease(uint64 surface_id) = 0;
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
virtual void CreatePluginContainer(gfx::PluginWindowHandle id) = 0;
virtual void DestroyPluginContainer(gfx::PluginWindowHandle id) = 0;
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
#if defined(OS_WIN) && !defined(USE_AURA)
virtual void WillWmDestroy() = 0;
diff --git a/content/public/browser/keyboard_listener.h b/content/public/browser/keyboard_listener.h
index 45e8a86..26e24f3 100644
--- a/content/public/browser/keyboard_listener.h
+++ b/content/public/browser/keyboard_listener.h
@@ -8,15 +8,15 @@
#include "content/common/content_export.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
typedef struct _GdkEventKey GdkEventKey;
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
class CONTENT_EXPORT KeyboardListener {
public:
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
virtual bool HandleKeyPressEvent(GdkEventKey* event) = 0;
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
protected:
virtual ~KeyboardListener() {}
diff --git a/content/public/browser/native_web_keyboard_event.h b/content/public/browser/native_web_keyboard_event.h
index 4cb2c67..0d8c72d 100644
--- a/content/public/browser/native_web_keyboard_event.h
+++ b/content/public/browser/native_web_keyboard_event.h
@@ -27,7 +27,7 @@ struct CONTENT_EXPORT NativeWebKeyboardEvent :
wchar_t character,
int state,
double time_stamp_seconds);
-#elif defined(OS_MACOSX) || defined(TOOLKIT_USES_GTK)
+#elif defined(OS_MACOSX) || defined(TOOLKIT_GTK)
// TODO(suzhe): Limit these constructors to Linux native Gtk port.
// For Linux Views port, after using RenderWidgetHostViewViews to replace
// RenderWidgetHostViewGtk, we can use constructors for TOOLKIT_VIEWS defined
@@ -66,7 +66,7 @@ struct CONTENT_EXPORT NativeWebKeyboardEvent :
// Currently, it's only used by Linux and Mac ports.
bool skip_in_browser;
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// True if the key event matches an edit command. In order to ensure the edit
// command always work in web page, the browser should not pre-handle this key
// event as a reserved accelerator. See http://crbug.com/54573
diff --git a/content/public/browser/render_widget_host_view.h b/content/public/browser/render_widget_host_view.h
index 367eca5..6fdcdee 100644
--- a/content/public/browser/render_widget_host_view.h
+++ b/content/public/browser/render_widget_host_view.h
@@ -6,7 +6,7 @@
#define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_
#pragma once
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gdk/gdk.h>
#endif
@@ -116,14 +116,12 @@ class CONTENT_EXPORT RenderWidgetHostView {
virtual void WindowFrameChanged() = 0;
#endif // defined(OS_MACOSX)
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// Gets the event for the last mouse down.
virtual GdkEventButton* GetLastMouseDown() = 0;
-#if !defined(TOOLKIT_VIEWS)
// Builds a submenu containing all the gtk input method commands.
virtual gfx::NativeView BuildInputMethodsGtkMenu() = 0;
-#endif // !defined(TOOLKIT_VIEWS)
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
// Subclasses should override this method to do what is appropriate to set
// the custom background for their platform.
@@ -139,5 +137,3 @@ class CONTENT_EXPORT RenderWidgetHostView {
} // namespace content
#endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_
-
-
diff --git a/content/public/browser/web_contents_view_delegate.h b/content/public/browser/web_contents_view_delegate.h
index dbd67ff..109f1c1 100644
--- a/content/public/browser/web_contents_view_delegate.h
+++ b/content/public/browser/web_contents_view_delegate.h
@@ -6,7 +6,7 @@
#define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_WIN_DELEGATE_H_
#pragma once
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
#elif defined(OS_MACOSX)
#import <Cocoa/Cocoa.h>
@@ -54,7 +54,7 @@ class CONTENT_EXPORT WebContentsViewDelegate {
virtual bool Focus() = 0;
virtual void TakeFocus(bool reverse) = 0;
virtual void SizeChanged(const gfx::Size& size) = 0;
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
// Initializes the WebContentsViewDelegate.
virtual void Initialize(GtkWidget* expanded_container,
ui::FocusStoreGtk* focus_store) = 0;
diff --git a/content/public/browser/web_drag_dest_delegate.h b/content/public/browser/web_drag_dest_delegate.h
index bb65e16..cb162ff 100644
--- a/content/public/browser/web_drag_dest_delegate.h
+++ b/content/public/browser/web_drag_dest_delegate.h
@@ -6,9 +6,9 @@
#define CONTENT_PUBLIC_BROWSER_WEB_DRAG_DEST_DELEGATE_H_
#pragma once
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
-#endif // TOOLKIT_USES_GTK
+#endif // TOOLKIT_GTK
#include "base/string16.h"
@@ -49,7 +49,7 @@ class WebDragDestDelegate {
virtual void OnDragLeave() = 0;
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// Returns the bookmark atom type. GTK and Views return different values here.
virtual GdkAtom GetBookmarkTargetAtom() const = 0;
@@ -67,7 +67,7 @@ class WebDragDestDelegate {
// data, it should return false.
virtual bool AddDragData(const WebDropData& drop_data,
ui::OSExchangeData* data) = 0;
-#endif // TOOLKIT_USES_GTK
+#endif // TOOLKIT_GTK
virtual ~WebDragDestDelegate() {}
};
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 664eb59..8103dc5 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -4300,7 +4300,7 @@ void RenderViewImpl::OnSetRendererPrefs(
double old_zoom_level = renderer_preferences_.default_zoom_level;
renderer_preferences_ = renderer_prefs;
UpdateFontRenderingFromRendererPrefs();
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
WebColorName name = WebKit::WebColorWebkitFocusRingColor;
WebKit::setNamedColors(&name, &renderer_prefs.focus_ring_color, 1);
WebKit::setCaretBlinkInterval(renderer_prefs.caret_blink_interval);
@@ -4310,9 +4310,9 @@ void RenderViewImpl::OnSetRendererPrefs(
renderer_prefs.track_color);
#endif
-#if defined(USE_ASH) || defined(TOOLKIT_USES_GTK)
+#if defined(USE_ASH) || defined(TOOLKIT_GTK)
if (webview()) {
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
webview()->setScrollbarColors(
renderer_prefs.thumb_inactive_color,
renderer_prefs.thumb_active_color,
diff --git a/content/renderer/webplugin_delegate_proxy.cc b/content/renderer/webplugin_delegate_proxy.cc
index 1945670..c6f0af5 100644
--- a/content/renderer/webplugin_delegate_proxy.cc
+++ b/content/renderer/webplugin_delegate_proxy.cc
@@ -4,7 +4,7 @@
#include "content/renderer/webplugin_delegate_proxy.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
#elif defined(USE_X11)
#include <cairo/cairo.h>
diff --git a/content/utility/utility_thread_impl.cc b/content/utility/utility_thread_impl.cc
index cf85fbd..b93eb54 100644
--- a/content/utility/utility_thread_impl.cc
+++ b/content/utility/utility_thread_impl.cc
@@ -21,7 +21,7 @@
#include "webkit/glue/idb_bindings.h"
#include "webkit/plugins/npapi/plugin_list.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
#include "ui/gfx/gtk_util.h"
@@ -138,7 +138,7 @@ void UtilityThreadImpl::OnLoadPlugins(
// before attempting to call into the plugin.
// g_thread_init API is deprecated since glib 2.31.0, please see release note:
// http://mail.gnome.org/archives/gnome-announce-list/2011-October/msg00041.html
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#if !(GLIB_CHECK_VERSION(2, 31, 0))
if (!g_thread_get_initialized()) {
g_thread_init(NULL);
diff --git a/gpu/demos/framework/main_exe.cc b/gpu/demos/framework/main_exe.cc
index 296d164..12d3828 100644
--- a/gpu/demos/framework/main_exe.cc
+++ b/gpu/demos/framework/main_exe.cc
@@ -8,9 +8,9 @@
#include "gpu/demos/framework/window.h"
#include "ui/gfx/gl/gl_surface.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
-#endif // TOOLKIT_USES_GTK
+#endif // TOOLKIT_GTK
namespace {
static const int kWindowWidth = 512;
@@ -18,9 +18,9 @@ static const int kWindowHeight = 512;
} // namespace.
int main(int argc, char** argv) {
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
gtk_init(&argc, &argv);
-#endif // TOOLKIT_USES_GTK
+#endif // TOOLKIT_GTK
// AtExitManager is used by singleton classes to delete themselves when
// the program terminates.
diff --git a/gpu/gles2_conform_support/native/main.cc b/gpu/gles2_conform_support/native/main.cc
index fd3dc75..99d9858 100644
--- a/gpu/gles2_conform_support/native/main.cc
+++ b/gpu/gles2_conform_support/native/main.cc
@@ -5,7 +5,7 @@
#include "base/at_exit.h"
#include "base/message_loop.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
#endif
@@ -18,7 +18,7 @@ extern "C" {
}
int main(int argc, char *argv[]) {
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
gtk_init(&argc, &argv);
#endif
diff --git a/media/tools/shader_bench/shader_bench.cc b/media/tools/shader_bench/shader_bench.cc
index f20ab62..37eae1b 100644
--- a/media/tools/shader_bench/shader_bench.cc
+++ b/media/tools/shader_bench/shader_bench.cc
@@ -25,7 +25,7 @@
#include "ui/gfx/gl/gl_surface.h"
#include "ui/gfx/native_widget_types.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
#endif
@@ -96,7 +96,7 @@ int main(int argc, char** argv) {
}
// Read command line.
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
gtk_init(&argc, &argv);
#endif
CommandLine::Init(argc, argv);
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index d5cd222..adb79f9 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -42,7 +42,7 @@
#include "remoting/jingle_glue/xmpp_signal_strategy.h"
#include "remoting/protocol/me2me_host_authenticator_factory.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "ui/gfx/gtk_util.h"
#endif
@@ -358,12 +358,12 @@ int main(int argc, char** argv) {
const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// Required for any calls into GTK functions, such as the Disconnect and
// Continue windows, though these should not be used for the Me2Me case
// (crbug.com/104377).
gfx::GtkInitFromCommandLine(*cmd_line);
-#endif // TOOLKIT_USES_GTK
+#endif // TOOLKIT_GTK
remoting::HostProcess me2me_host;
me2me_host.InitWithCommandLine(cmd_line);
diff --git a/remoting/host/simple_host_process.cc b/remoting/host/simple_host_process.cc
index eda7fa7..2818eea 100644
--- a/remoting/host/simple_host_process.cc
+++ b/remoting/host/simple_host_process.cc
@@ -50,7 +50,7 @@
#include "remoting/protocol/it2me_host_authenticator_factory.h"
#include "remoting/protocol/me2me_host_authenticator_factory.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "ui/gfx/gtk_util.h"
#elif defined(OS_MACOSX)
#include "base/mac/scoped_nsautorelease_pool.h"
@@ -306,9 +306,9 @@ int main(int argc, char** argv) {
base::AtExitManager exit_manager;
crypto::EnsureNSPRInit();
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
gfx::GtkInitFromCommandLine(*cmd_line);
-#endif // TOOLKIT_USES_GTK
+#endif // TOOLKIT_GTK
remoting::SimpleHost simple_host;
diff --git a/skia/ext/canvas_paint.h b/skia/ext/canvas_paint.h
index 051463f..89923b66 100644
--- a/skia/ext/canvas_paint.h
+++ b/skia/ext/canvas_paint.h
@@ -16,7 +16,7 @@
#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__sun)
#if defined(USE_WAYLAND)
#include "skia/ext/canvas_paint_wayland.h"
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
#include "skia/ext/canvas_paint_gtk.h"
#else
#include "skia/ext/canvas_paint_x.h"
diff --git a/third_party/cld/base/build_config.h b/third_party/cld/base/build_config.h
index 3bb388c..0292c14f 100644
--- a/third_party/cld/base/build_config.h
+++ b/third_party/cld/base/build_config.h
@@ -41,12 +41,6 @@
#error Please add support for your platform in build/build_config.h
#endif
-// A flag derived from the above flags, used to cover GTK code in
-// both TOOLKIT_GTK and TOOLKIT_VIEWS.
-#if defined(TOOLKIT_GTK) || (defined(TOOLKIT_VIEWS) && !defined(OS_WIN))
-#define TOOLKIT_USES_GTK 1
-#endif
-
#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_OPENBSD) || \
defined(OS_ANDROID)
#define USE_NSS 1 // Use NSS for crypto.
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
index bd5d9e5..d067510 100644
--- a/ui/base/accelerators/accelerator.cc
+++ b/ui/base/accelerators/accelerator.cc
@@ -6,7 +6,7 @@
#if defined(OS_WIN)
#include <windows.h>
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
#include <gdk/gdk.h>
#endif
@@ -92,7 +92,7 @@ string16 Accelerator::GetShortcutText() const {
if (c != 0) {
shortcut += static_cast<string16::value_type>(base::ToUpperASCII(c));
}
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
const gchar* name = NULL;
switch (key_code_) {
case ui::VKEY_OEM_2:
diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h
index 8abafac..dffb146 100644
--- a/ui/base/clipboard/clipboard.h
+++ b/ui/base/clipboard/clipboard.h
@@ -18,7 +18,7 @@
#include "base/threading/thread_checker.h"
#include "ui/base/ui_export.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gdk/gdk.h>
#endif
@@ -36,7 +36,7 @@ class Size;
class FilePath;
class SkBitmap;
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
typedef struct _GtkClipboard GtkClipboard;
#endif
@@ -94,7 +94,7 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
explicit FormatType(const std::string& native_format);
const std::string& ToString() const { return data_; }
std::string data_;
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
explicit FormatType(const std::string& native_format);
explicit FormatType(const GdkAtom& native_format);
const GdkAtom& ToGdkAtom() const { return data_; }
@@ -332,7 +332,7 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
// True if we can create a window.
bool create_window_;
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
// The public API is via WriteObjects() which dispatches to multiple
// Write*() calls, but on GTK we must write all the clipboard types
// in a single GTK call. To support this we store the current set
diff --git a/ui/base/clipboard/clipboard_unittest.cc b/ui/base/clipboard/clipboard_unittest.cc
index 697e1db..a39d27d 100644
--- a/ui/base/clipboard/clipboard_unittest.cc
+++ b/ui/base/clipboard/clipboard_unittest.cc
@@ -136,7 +136,7 @@ TEST_F(ClipboardTest, RTFTest) {
EXPECT_EQ(rtf, result);
}
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
TEST_F(ClipboardTest, MultipleBufferTest) {
Clipboard clipboard;
@@ -230,7 +230,7 @@ TEST_F(ClipboardTest, UniodeHTMLTest) {
}
#endif // defined(OS_WIN)
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// Regression test for crbug.com/56298 (pasting empty HTML crashes Linux).
TEST_F(ClipboardTest, EmptyHTMLTest) {
Clipboard clipboard;
diff --git a/ui/base/clipboard/custom_data_helper.h b/ui/base/clipboard/custom_data_helper.h
index 0bc2405..c01dbdf 100644
--- a/ui/base/clipboard/custom_data_helper.h
+++ b/ui/base/clipboard/custom_data_helper.h
@@ -31,7 +31,7 @@ namespace ui {
#if defined(OS_MACOSX)
UI_EXPORT extern NSString* const kWebCustomDataPboardType;
-#elif (!defined(OS_WIN) && defined(USE_AURA)) || defined(TOOLKIT_USES_GTK)
+#elif (!defined(OS_WIN) && defined(USE_AURA)) || defined(TOOLKIT_GTK)
UI_EXPORT extern const char kMimeTypeWebCustomData[];
#endif
diff --git a/ui/base/dragdrop/os_exchange_data.h b/ui/base/dragdrop/os_exchange_data.h
index 13206ee..9ec452d 100644
--- a/ui/base/dragdrop/os_exchange_data.h
+++ b/ui/base/dragdrop/os_exchange_data.h
@@ -13,7 +13,7 @@
#if defined(OS_WIN)
#include <objidl.h>
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
#endif
@@ -56,7 +56,7 @@ class UI_EXPORT OSExchangeData {
typedef Clipboard::FormatType CustomFormat;
#elif defined(OS_WIN)
typedef CLIPFORMAT CustomFormat;
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
typedef GdkAtom CustomFormat;
#else
typedef void* CustomFormat;
diff --git a/ui/base/keycodes/keyboard_code_conversion_x.cc b/ui/base/keycodes/keyboard_code_conversion_x.cc
index ecb27a4..622ca1c 100644
--- a/ui/base/keycodes/keyboard_code_conversion_x.cc
+++ b/ui/base/keycodes/keyboard_code_conversion_x.cc
@@ -329,7 +329,7 @@ KeyboardCode KeyboardCodeFromXKeysym(unsigned int keysym) {
case XK_F24:
return static_cast<KeyboardCode>(VKEY_F1 + (keysym - XK_F1));
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
case XF86XK_HomePage:
case XF86XK_Search:
case XF86XK_Back:
diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h
index 02c07c7..668823b 100644
--- a/ui/base/resource/resource_bundle.h
+++ b/ui/base/resource/resource_bundle.h
@@ -158,7 +158,7 @@ class UI_EXPORT ResourceBundle {
// Loads and returns a cursor from the app module.
HCURSOR LoadCursor(int cursor_id);
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
// Gets the GdkPixbuf with the specified resource_id from the main data pak
// file. Returns a pointer to a shared instance of the GdkPixbuf. This
// shared GdkPixbuf is owned by the resource bundle and should not be freed.
diff --git a/ui/base/x/events_x.cc b/ui/base/x/events_x.cc
index d29a152..8bb5aebd4 100644
--- a/ui/base/x/events_x.cc
+++ b/ui/base/x/events_x.cc
@@ -10,15 +10,12 @@
#include <string.h>
#include "base/logging.h"
+#include "base/message_pump_x.h"
#include "ui/base/keycodes/keyboard_code_conversion_x.h"
#include "ui/base/touch/touch_factory.h"
#include "ui/base/x/x11_util.h"
#include "ui/gfx/point.h"
-#if !defined(TOOLKIT_USES_GTK)
-#include "base/message_pump_x.h"
-#endif
-
// Copied from xserver-properties.h
#define AXIS_LABEL_PROP_REL_HWHEEL "Rel Horiz Wheel"
#define AXIS_LABEL_PROP_REL_WHEEL "Rel Vert Wheel"
@@ -508,13 +505,11 @@ float GetTouchParamFromXEvent(XEvent* xev,
return default_value;
}
-#if !defined(TOOLKIT_USES_GTK)
Atom GetNoopEventAtom() {
return XInternAtom(
base::MessagePumpX::GetDefaultXDisplay(),
"noop", False);
}
-#endif
} // namespace
@@ -864,13 +859,8 @@ void UpdateDeviceList() {
}
bool IsNoopEvent(const base::NativeEvent& event) {
-#if defined(TOOLKIT_USES_GTK)
- NOTREACHED();
- return false;
-#else
return (event->type == ClientMessage &&
event->xclient.message_type == GetNoopEventAtom());
-#endif
}
base::NativeEvent CreateNoopEvent() {
@@ -883,14 +873,9 @@ base::NativeEvent CreateNoopEvent() {
noop->xclient.format = 8;
DCHECK(!noop->xclient.display);
}
- // TODO(oshima): Remove ifdef once gtk is removed from views.
-#if defined(TOOLKIT_USES_GTK)
- NOTREACHED();
-#else
// Make sure we use atom from current xdisplay, which may
// change during the test.
noop->xclient.message_type = GetNoopEventAtom();
-#endif
return noop;
}
diff --git a/ui/base/x/x11_util.cc b/ui/base/x/x11_util.cc
index 01d55c5..5df42c0 100644
--- a/ui/base/x/x11_util.cc
+++ b/ui/base/x/x11_util.cc
@@ -39,7 +39,7 @@
#include <X11/Xcursor/Xcursor.h>
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
@@ -421,7 +421,7 @@ bool GetCurrentDesktop(int* desktop) {
return GetIntProperty(GetX11RootWindow(), "_NET_CURRENT_DESKTOP", desktop);
}
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
XID GetX11WindowFromGtkWidget(GtkWidget* widget) {
return GDK_WINDOW_XID(gtk_widget_get_window(widget));
}
@@ -446,7 +446,7 @@ GtkWindow* GetGtkWindowFromX11Window(XID xid) {
void* GetVisualFromGtkWidget(GtkWidget* widget) {
return GDK_VISUAL_XVISUAL(gtk_widget_get_visual(widget));
}
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
int BitsPerPixelForPixmapDepth(Display* dpy, int depth) {
int count;
@@ -646,7 +646,7 @@ bool SetIntArrayProperty(XID window,
}
Atom GetAtom(const char* name) {
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
return gdk_x11_get_xatom_by_name_for_display(
gdk_display_get_default(), name);
#else
@@ -1037,7 +1037,7 @@ bool IsX11WindowFullScreen(XID window) {
!= atom_properties.end())
return true;
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// As the last resort, check if the window size is as large as the main
// screen.
GdkRectangle monitor_rect;
diff --git a/ui/base/x/x11_util.h b/ui/base/x/x11_util.h
index 64e7d64..771e8ef 100644
--- a/ui/base/x/x11_util.h
+++ b/ui/base/x/x11_util.h
@@ -26,7 +26,7 @@ typedef struct _XDisplay Display;
typedef unsigned long Cursor;
typedef struct _XcursorImage XcursorImage;
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
typedef struct _GdkDrawable GdkWindow;
typedef struct _GtkWidget GtkWidget;
typedef struct _GtkWindow GtkWindow;
@@ -99,7 +99,7 @@ UI_EXPORT XID GetX11RootWindow();
// Returns the user's current desktop.
bool GetCurrentDesktop(int* desktop);
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// Get the X window id for the given GTK widget.
UI_EXPORT XID GetX11WindowFromGtkWidget(GtkWidget* widget);
XID GetX11WindowFromGdkWindow(GdkWindow* window);
@@ -112,7 +112,7 @@ UI_EXPORT GtkWindow* GetGtkWindowFromX11Window(XID xid);
// Get a Visual from the given widget. Since we don't include the Xlib
// headers, this is returned as a void*.
UI_EXPORT void* GetVisualFromGtkWidget(GtkWidget* widget);
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
// Return the number of bits-per-pixel for a pixmap of the given depth
UI_EXPORT int BitsPerPixelForPixmapDepth(Display* display, int depth);
diff --git a/ui/gfx/compositor/test/test_compositor_host_linux.cc b/ui/gfx/compositor/test/test_compositor_host_linux.cc
index 739ec71..61578b8 100644
--- a/ui/gfx/compositor/test/test_compositor_host_linux.cc
+++ b/ui/gfx/compositor/test/test_compositor_host_linux.cc
@@ -41,7 +41,7 @@ class TestCompositorHostLinux : public TestCompositorHost,
#if defined(USE_AURA)
virtual base::MessagePumpDispatcher::DispatchStatus
Dispatch(XEvent* xev) OVERRIDE;
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
virtual bool Dispatch(GdkEvent* event) OVERRIDE;
#endif
@@ -109,7 +109,7 @@ base::MessagePumpDispatcher::DispatchStatus TestCompositorHostLinux::Dispatch(
XEvent* xev) {
return MessagePumpDispatcher::EVENT_IGNORED;
}
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
bool TestCompositorHostLinux::Dispatch(GdkEvent*) {
return false;
}
diff --git a/ui/gfx/image/image.cc b/ui/gfx/image/image.cc
index fbaf95ec..afce7d8 100644
--- a/ui/gfx/image/image.cc
+++ b/ui/gfx/image/image.cc
@@ -11,7 +11,7 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/size.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk/gdk.h>
#include <glib-object.h>
@@ -33,7 +33,7 @@ namespace internal {
bool NSImageToSkBitmaps(NSImage* image, std::vector<const SkBitmap*>* bitmaps);
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
const SkBitmap* GdkPixbufToSkBitmap(GdkPixbuf* pixbuf) {
CHECK(pixbuf);
gfx::Canvas canvas(gfx::Size(gdk_pixbuf_get_width(pixbuf),
@@ -69,7 +69,7 @@ class ImageRep {
return reinterpret_cast<ImageRepSkia*>(this);
}
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
ImageRepGdk* AsImageRepGdk() {
CHECK_EQ(type_, Image::kImageRepGdk);
return reinterpret_cast<ImageRepGdk*>(this);
@@ -125,7 +125,7 @@ class ImageRepSkia : public ImageRep {
DISALLOW_COPY_AND_ASSIGN(ImageRepSkia);
};
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
class ImageRepGdk : public ImageRep {
public:
explicit ImageRepGdk(GdkPixbuf* pixbuf)
@@ -170,7 +170,7 @@ class ImageRepCairoCached : public ImageRep {
DISALLOW_COPY_AND_ASSIGN(ImageRepCairoCached);
};
-#endif // defined(TOOLKIT_USES_GTK)
+#endif // defined(TOOLKIT_GTK)
#if defined(OS_MACOSX)
class ImageRepCocoa : public ImageRep {
@@ -255,7 +255,7 @@ Image::Image(const std::vector<const SkBitmap*>& bitmaps)
AddRepresentation(rep);
}
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
Image::Image(GdkPixbuf* pixbuf)
: storage_(new internal::ImageStorage(Image::kImageRepGdk)) {
internal::ImageRepGdk* rep = new internal::ImageRepGdk(pixbuf);
@@ -287,7 +287,7 @@ const SkBitmap* Image::ToSkBitmap() const {
return rep->AsImageRepSkia()->bitmap();
}
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
GdkPixbuf* Image::ToGdkPixbuf() const {
internal::ImageRep* rep = GetRepresentation(Image::kImageRepGdk);
return rep->AsImageRepGdk()->pixbuf();
@@ -310,7 +310,7 @@ SkBitmap* Image::CopySkBitmap() const {
return new SkBitmap(*ToSkBitmap());
}
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
GdkPixbuf* Image::CopyGdkPixbuf() const {
GdkPixbuf* pixbuf = ToGdkPixbuf();
g_object_ref(pixbuf);
@@ -379,7 +379,7 @@ internal::ImageRep* Image::GetRepresentation(
// Handle native-to-Skia conversion.
if (rep_type == Image::kImageRepSkia) {
internal::ImageRepSkia* rep = NULL;
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
if (storage_->default_representation_type() == Image::kImageRepGdk) {
internal::ImageRepGdk* pixbuf_rep = default_rep->AsImageRepGdk();
rep = new internal::ImageRepSkia(
@@ -400,7 +400,7 @@ internal::ImageRep* Image::GetRepresentation(
AddRepresentation(rep);
return rep;
}
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
else if (rep_type == Image::kImageRepCairoCache) {
// Handle any-to-Cairo conversion. This may recursively create an
// intermediate pixbuf before we send the data to the display server.
@@ -419,7 +419,7 @@ internal::ImageRep* Image::GetRepresentation(
internal::ImageRep* native_rep = NULL;
#if defined(USE_AURA)
NOTIMPLEMENTED();
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
if (rep_type == Image::kImageRepGdk) {
GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(
default_rep->AsImageRepSkia()->bitmap());
diff --git a/ui/gfx/image/image.h b/ui/gfx/image/image.h
index 3c2c05d..1878f49 100644
--- a/ui/gfx/image/image.h
+++ b/ui/gfx/image/image.h
@@ -38,7 +38,7 @@ class ImageMacTest;
namespace gfx {
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
class CairoCachedSurface;
#endif
@@ -73,7 +73,7 @@ class UI_EXPORT Image {
// of bitmaps, one for each resolution.
explicit Image(const std::vector<const SkBitmap*>& bitmaps);
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// Does not increase |pixbuf|'s reference count; expects to take ownership.
explicit Image(GdkPixbuf* pixbuf);
#elif defined(OS_MACOSX)
@@ -97,7 +97,7 @@ class UI_EXPORT Image {
// The returned result is a weak pointer owned by and scoped to the life of
// the Image.
const SkBitmap* ToSkBitmap() const;
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
GdkPixbuf* ToGdkPixbuf() const;
CairoCachedSurface* const ToCairo() const;
#elif defined(OS_MACOSX)
@@ -111,7 +111,7 @@ class UI_EXPORT Image {
// converted representations, rather than a limitation imposed by Image) and
// so the result should be considered immutable.
SkBitmap* CopySkBitmap() const;
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
GdkPixbuf* CopyGdkPixbuf() const;
#elif defined(OS_MACOSX)
NSImage* CopyNSImage() const;
diff --git a/ui/gfx/image/image_unittest.cc b/ui/gfx/image/image_unittest.cc
index 0516523..e5129ff0 100644
--- a/ui/gfx/image/image_unittest.cc
+++ b/ui/gfx/image/image_unittest.cc
@@ -8,7 +8,7 @@
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_unittest_util.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
#include "ui/gfx/gtk_util.h"
#elif defined(OS_MACOSX)
@@ -161,7 +161,7 @@ TEST_F(ImageTest, PlatformToSkiaToCopy) {
delete bitmap;
}
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
TEST_F(ImageTest, SkiaToGdkCopy) {
GdkPixbuf* pixbuf;
diff --git a/ui/gfx/image/image_unittest_util.cc b/ui/gfx/image/image_unittest_util.cc
index 60b16fd..6a72869 100644
--- a/ui/gfx/image/image_unittest_util.cc
+++ b/ui/gfx/image/image_unittest_util.cc
@@ -10,7 +10,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "ui/gfx/gtk_util.h"
#elif defined(OS_MACOSX)
#include "base/mac/mac_util.h"
diff --git a/ui/gfx/insets.h b/ui/gfx/insets.h
index 9cf5e0a..d9d7ad8 100644
--- a/ui/gfx/insets.h
+++ b/ui/gfx/insets.h
@@ -11,7 +11,7 @@
#include "build/build_config.h"
#include "ui/base/ui_export.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gtk/gtk.h>
#endif
@@ -30,7 +30,7 @@ class UI_EXPORT Insets {
left_(left),
bottom_(bottom),
right_(right) {}
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
explicit Insets(const GtkBorder& border)
: top_(border.top),
left_(border.left),
diff --git a/ui/gfx/native_widget_types.h b/ui/gfx/native_widget_types.h
index 7d25743..964ffc9 100644
--- a/ui/gfx/native_widget_types.h
+++ b/ui/gfx/native_widget_types.h
@@ -89,7 +89,7 @@ class WaylandWindow;
}
typedef struct _GdkRegion GdkRegion;
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
typedef struct _GdkCursor GdkCursor;
typedef union _GdkEvent GdkEvent;
typedef struct _GdkPixbuf GdkPixbuf;
@@ -128,7 +128,7 @@ typedef ui::WaylandWindow* NativeWindow;
// a Wayland specific region
typedef GdkRegion* NativeRegion;
typedef void* NativeEvent;
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
typedef GdkCursor* NativeCursor;
typedef GtkWidget* NativeView;
typedef GtkWindow* NativeWindow;
@@ -160,7 +160,7 @@ typedef void* NativeEditView;
typedef cairo_t* NativeDrawingContext;
typedef void* NativeMenu;
typedef void* NativeViewAccessible;
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
typedef PangoFontDescription* NativeFont;
typedef GtkWidget* NativeEditView;
typedef cairo_t* NativeDrawingContext;
diff --git a/ui/gfx/pango_util.cc b/ui/gfx/pango_util.cc
index 301b3cb..b051729 100644
--- a/ui/gfx/pango_util.cc
+++ b/ui/gfx/pango_util.cc
@@ -20,7 +20,7 @@
#include "ui/gfx/platform_font_pango.h"
#include "ui/gfx/rect.h"
-#if !defined(USE_WAYLAND) && defined(TOOLKIT_USES_GTK)
+#if !defined(USE_WAYLAND) && defined(TOOLKIT_GTK)
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include "ui/gfx/gtk_util.h"
@@ -50,7 +50,7 @@ cairo_font_options_t* GetCairoFontOptions() {
cairo_font_options = cairo_font_options_create();
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
gint antialias = 0;
gint hinting = 0;
gchar* hint_style = NULL;
diff --git a/ui/gfx/platform_font_pango.cc b/ui/gfx/platform_font_pango.cc
index 47f5eaa..b09819e 100644
--- a/ui/gfx/platform_font_pango.cc
+++ b/ui/gfx/platform_font_pango.cc
@@ -22,7 +22,7 @@
#include "ui/gfx/font.h"
#include "ui/gfx/pango_util.h"
-#if !defined(USE_WAYLAND) && defined(TOOLKIT_USES_GTK)
+#if !defined(USE_WAYLAND) && defined(TOOLKIT_GTK)
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#endif
@@ -63,7 +63,7 @@ std::string FindBestMatchFontFamilyName(
// Returns a Pango font description (suitable for parsing by
// pango_font_description_from_string()) for the default UI font.
std::string GetDefaultFont() {
-#if defined(USE_WAYLAND) || !defined(TOOLKIT_USES_GTK)
+#if defined(USE_WAYLAND) || !defined(TOOLKIT_GTK)
#if defined(OS_CHROMEOS)
return l10n_util::GetStringUTF8(IDS_UI_FONT_FAMILY_CROS);
#else
@@ -82,7 +82,7 @@ std::string GetDefaultFont() {
std::string default_font = std::string(font_name);
g_free(font_name);
return default_font;
-#endif // defined(USE_WAYLAND) || !defined(TOOLKIT_USES_GTK)
+#endif // defined(USE_WAYLAND) || !defined(TOOLKIT_GTK)
}
} // namespace
diff --git a/ui/gfx/rect.cc b/ui/gfx/rect.cc
index e0358c8..f05dc09 100644
--- a/ui/gfx/rect.cc
+++ b/ui/gfx/rect.cc
@@ -8,7 +8,7 @@
#include <windows.h>
#elif defined(OS_MACOSX)
#include <CoreGraphics/CGGeometry.h>
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
#include <gdk/gdk.h>
#endif
#if defined(USE_WAYLAND)
@@ -80,7 +80,7 @@ Rect& Rect::operator=(const CGRect& r) {
set_height(r.size.height);
return *this;
}
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
Rect::Rect(const GdkRectangle& r)
: origin_(r.x, r.y) {
set_width(r.width);
@@ -158,7 +158,7 @@ RECT Rect::ToRECT() const {
CGRect Rect::ToCGRect() const {
return CGRectMake(x(), y(), width(), height());
}
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
GdkRectangle Rect::ToGdkRectangle() const {
GdkRectangle r = {x(), y(), width(), height()};
return r;
diff --git a/ui/gfx/rect.h b/ui/gfx/rect.h
index d19074c..1136471 100644
--- a/ui/gfx/rect.h
+++ b/ui/gfx/rect.h
@@ -20,7 +20,7 @@
#if defined(OS_WIN)
typedef struct tagRECT RECT;
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
typedef struct _GdkRectangle GdkRectangle;
#endif
@@ -41,7 +41,7 @@ class UI_EXPORT Rect {
explicit Rect(const RECT& r);
#elif defined(OS_MACOSX)
explicit Rect(const CGRect& r);
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
explicit Rect(const GdkRectangle& r);
#endif
#if defined(USE_WAYLAND)
@@ -56,7 +56,7 @@ class UI_EXPORT Rect {
Rect& operator=(const RECT& r);
#elif defined(OS_MACOSX)
Rect& operator=(const CGRect& r);
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
Rect& operator=(const GdkRectangle& r);
#endif
#if defined(USE_WAYLAND)
@@ -123,7 +123,7 @@ class UI_EXPORT Rect {
#if defined(OS_WIN)
// Construct an equivalent Win32 RECT object.
RECT ToRECT() const;
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
GdkRectangle ToGdkRectangle() const;
#elif defined(OS_MACOSX)
// Construct an equivalent CoreGraphics object.
diff --git a/webkit/glue/webcursor.h b/webkit/glue/webcursor.h
index 23d55fe..6da6cdd 100644
--- a/webkit/glue/webcursor.h
+++ b/webkit/glue/webcursor.h
@@ -17,7 +17,7 @@
typedef struct HINSTANCE__* HINSTANCE;
typedef struct HICON__* HICON;
typedef HICON HCURSOR;
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
typedef struct _GdkCursor GdkCursor;
#elif defined(OS_MACOSX)
#ifdef __OBJC__
@@ -84,7 +84,7 @@ class WEBKIT_GLUE_EXPORT WebCursor {
// APIs on it.
void InitFromExternalCursor(HCURSOR handle);
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
// Return the stock GdkCursorType for this cursor, or GDK_CURSOR_IS_PIXMAP
// if it's a custom cursor. Return GDK_LAST_CURSOR to indicate that the cursor
// should be set to the system default.
@@ -154,7 +154,7 @@ class WEBKIT_GLUE_EXPORT WebCursor {
HCURSOR external_cursor_;
// A custom cursor created from custom bitmap data by Webkit.
HCURSOR custom_cursor_;
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
// A custom cursor created that should be unref'ed from the destructor.
GdkCursor* unref_;
#endif
diff --git a/webkit/glue/webcursor_unittest.cc b/webkit/glue/webcursor_unittest.cc
index 830905b..7601938 100644
--- a/webkit/glue/webcursor_unittest.cc
+++ b/webkit/glue/webcursor_unittest.cc
@@ -29,7 +29,7 @@ TEST(WebCursorTest, OKCursorSerialization) {
PickleIterator iter(ok_custom_pickle);
EXPECT_TRUE(custom_cursor.Deserialize(&iter));
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// On GTK+ using platforms, we should get a real native GdkCursor object back
// (and the memory used should automatically be freed by the WebCursor object
// for valgrind tests).
@@ -157,7 +157,7 @@ TEST(WebCursorTest, EmptyImage) {
PickleIterator iter(broken_cursor_pickle);
ASSERT_TRUE(custom_cursor.Deserialize(&iter));
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// On GTK+ using platforms, we make sure that we get NULL back from this
// method; the relevant GDK methods take NULL as a request to use the default
// cursor.
diff --git a/webkit/plugins/npapi/plugin_host.cc b/webkit/plugins/npapi/plugin_host.cc
index 25df1f8..7b8cea7 100644
--- a/webkit/plugins/npapi/plugin_host.cc
+++ b/webkit/plugins/npapi/plugin_host.cc
@@ -757,7 +757,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
rv = NPERR_NO_ERROR;
break;
}
- #if defined(TOOLKIT_USES_GTK)
+ #if defined(TOOLKIT_GTK)
case NPNVToolkit:
// Tell them we are GTK2. (The alternative is GTK 1.2.)
*reinterpret_cast<int*>(value) = NPNVGtk2;
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl.h b/webkit/plugins/npapi/webplugin_delegate_impl.h
index 102cd3c..8bdf50e 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl.h
+++ b/webkit/plugins/npapi/webplugin_delegate_impl.h
@@ -352,7 +352,7 @@ class WEBKIT_PLUGINS_EXPORT WebPluginDelegateImpl : public WebPluginDelegate {
XID windowless_shm_pixmap_;
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// The pixmap we're drawing into, for a windowless plugin.
GdkPixmap* pixmap_;
double first_event_time_;
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc
index 0f2ee69..a3ff607 100644
--- a/webkit/support/webkit_support.cc
+++ b/webkit/support/webkit_support.cc
@@ -42,7 +42,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "ui/base/keycodes/keyboard_code_conversion_gtk.h"
#endif
#include "ui/gfx/gl/gl_context.h"
@@ -693,7 +693,7 @@ WebKit::WebString RegisterIsolatedFileSystem(
}
// Keyboard code
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
int NativeKeyCodeForWindowsKeyCode(int keycode, bool shift) {
ui::KeyboardCode code = static_cast<ui::KeyboardCode>(keycode);
return ui::GdkNativeKeyCodeForWindowsKeyCode(code, shift);
diff --git a/webkit/support/webkit_support.h b/webkit/support/webkit_support.h
index feaf0e4..e112fcd 100644
--- a/webkit/support/webkit_support.h
+++ b/webkit/support/webkit_support.h
@@ -237,7 +237,7 @@ enum {
VKEY_F1 = ui::VKEY_F1,
};
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
int NativeKeyCodeForWindowsKeyCode(int keycode, bool shift);
#endif
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 7698d6a..d1c584b 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -965,7 +965,7 @@ TestWebViewDelegate::TestWebViewDelegate(TestShell* shell)
page_id_(-1),
last_page_id_updated_(-1),
using_fake_rect_(false),
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
cursor_type_(GDK_X_CURSOR),
#endif
smart_insert_delete_enabled_(true),
diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h
index 29af104..8a87db3 100644
--- a/webkit/tools/test_shell/test_webview_delegate.h
+++ b/webkit/tools/test_shell/test_webview_delegate.h
@@ -41,7 +41,7 @@
#include "webkit/tools/test_shell/drop_delegate.h"
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include <gdk/gdk.h>
#endif
@@ -407,7 +407,7 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
scoped_refptr<TestDropDelegate> drop_delegate_;
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// The type of cursor the window is currently using.
// Used for judging whether a new SetCursor call is actually changing the
// cursor.
diff --git a/webkit/tools/test_shell/webview_host.h b/webkit/tools/test_shell/webview_host.h
index 4ea261a..5faf32d 100644
--- a/webkit/tools/test_shell/webview_host.h
+++ b/webkit/tools/test_shell/webview_host.h
@@ -10,7 +10,7 @@
#include "ui/gfx/rect.h"
#include "webkit/tools/test_shell/webwidget_host.h"
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
#include "webkit/plugins/npapi/gtk_plugin_container_manager.h"
#endif
@@ -35,7 +35,7 @@ class WebViewHost : public WebWidgetHost {
WebKit::WebView* webview() const;
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// Create a new plugin parent container for a given plugin XID.
void CreatePluginContainer(gfx::PluginWindowHandle id);
@@ -56,7 +56,7 @@ class WebViewHost : public WebWidgetHost {
}
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// Helper class that creates and moves plugin containers.
webkit::npapi::GtkPluginContainerManager plugin_container_manager_;
#endif
diff --git a/webkit/tools/test_shell/webwidget_host.h b/webkit/tools/test_shell/webwidget_host.h
index 6c50d07..3dd430d 100644
--- a/webkit/tools/test_shell/webwidget_host.h
+++ b/webkit/tools/test_shell/webwidget_host.h
@@ -97,7 +97,7 @@ class WebWidgetHost {
void KeyEvent(NSEvent *);
void SetFocus(bool enable);
protected:
-#elif defined(TOOLKIT_USES_GTK)
+#elif defined(TOOLKIT_GTK)
public:
// ---------------------------------------------------------------------------
// This is needed on Linux because the GtkWidget creation is the same between
@@ -142,7 +142,7 @@ class WebWidgetHost {
bool track_mouse_leave_;
#endif
-#if defined(TOOLKIT_USES_GTK)
+#if defined(TOOLKIT_GTK)
// Since GtkWindow resize is asynchronous, we have to stash the dimensions,
// so that the backing store doesn't have to wait for sizing to take place.
gfx::Size logical_size_;