diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/common/chrome_paths_linux.cc | 4 | ||||
-rw-r--r-- | chrome/common/gfx/chrome_canvas.h | 2 | ||||
-rw-r--r-- | chrome/common/gfx/path.h | 2 | ||||
-rw-r--r-- | chrome/common/native_web_keyboard_event.h | 6 | ||||
-rw-r--r-- | chrome/common/resource_bundle.cc | 4 | ||||
-rw-r--r-- | chrome/common/resource_bundle.h | 6 | ||||
-rw-r--r-- | chrome/common/resource_bundle_linux.cc | 6 | ||||
-rw-r--r-- | chrome/views/widget/root_view.h | 4 |
8 files changed, 10 insertions, 24 deletions
diff --git a/chrome/common/chrome_paths_linux.cc b/chrome/common/chrome_paths_linux.cc index b1151c5..d3ce207 100644 --- a/chrome/common/chrome_paths_linux.cc +++ b/chrome/common/chrome_paths_linux.cc @@ -4,9 +4,7 @@ #include "chrome/common/chrome_paths_internal.h" -#if defined(TOOLKIT_GTK) #include <glib.h> -#endif #include <stdlib.h> #include "base/file_path.h" @@ -21,11 +19,9 @@ FilePath GetHomeDir() { if (home_dir && home_dir[0]) return FilePath(home_dir); -#if defined(TOOLKIT_GTK) home_dir = g_get_home_dir(); if (home_dir && home_dir[0]) return FilePath(home_dir); -#endif FilePath rv; if (PathService::Get(base::DIR_TEMP, &rv)) diff --git a/chrome/common/gfx/chrome_canvas.h b/chrome/common/gfx/chrome_canvas.h index cfb0c28..dbf9466 100644 --- a/chrome/common/gfx/chrome_canvas.h +++ b/chrome/common/gfx/chrome_canvas.h @@ -195,7 +195,7 @@ class ChromeCanvas : public skia::PlatformCanvas { DISALLOW_EVIL_CONSTRUCTORS(ChromeCanvas); }; -#if defined(OS_WIN) || defined(TOOLKIT_GTK) +#if defined(OS_WIN) || defined(OS_LINUX) typedef skia::CanvasPaintT<ChromeCanvas> ChromeCanvasPaint; #endif diff --git a/chrome/common/gfx/path.h b/chrome/common/gfx/path.h index 7d6d3a0..ac7537c 100644 --- a/chrome/common/gfx/path.h +++ b/chrome/common/gfx/path.h @@ -25,7 +25,7 @@ class Path : public SkPath { // Creates a HRGN from the path. The caller is responsible for freeing // resources used by this region. This only supports polygon paths. HRGN CreateHRGN() const; -#elif defined(TOOLKIT_GTK) +#elif defined(OS_LINUX) // Creates a Gdkregion from the path. The caller is responsible for freeing // resources used by this region. This only supports polygon paths. GdkRegion* CreateGdkRegion() const; diff --git a/chrome/common/native_web_keyboard_event.h b/chrome/common/native_web_keyboard_event.h index c055528..0400b41 100644 --- a/chrome/common/native_web_keyboard_event.h +++ b/chrome/common/native_web_keyboard_event.h @@ -16,7 +16,7 @@ #else class NSEvent; #endif // __OBJC__ -#elif defined(TOOLKIT_GTK) +#elif defined(OS_LINUX) #include <gdk/gdk.h> #endif @@ -29,7 +29,7 @@ struct NativeWebKeyboardEvent : public WebKit::WebKeyboardEvent { NativeWebKeyboardEvent(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); #elif defined(OS_MACOSX) explicit NativeWebKeyboardEvent(NSEvent *event); -#elif defined(TOOLKIT_GTK) +#elif defined(OS_LINUX) explicit NativeWebKeyboardEvent(const GdkEventKey* event); #endif @@ -42,7 +42,7 @@ struct NativeWebKeyboardEvent : public WebKit::WebKeyboardEvent { MSG os_event; #elif defined(OS_MACOSX) NSEvent* os_event; -#elif defined(TOOLKIT_GTK) +#elif defined(OS_LINUX) GdkEventKey* os_event; #endif }; diff --git a/chrome/common/resource_bundle.cc b/chrome/common/resource_bundle.cc index f87560d..3ffc026 100644 --- a/chrome/common/resource_bundle.cc +++ b/chrome/common/resource_bundle.cc @@ -52,9 +52,7 @@ void ResourceBundle::FreeImages() { } void ResourceBundle::SetThemeExtension(const Extension& e) { -#if !defined(LINUX2) theme_extension_.reset(new Extension(e)); -#endif } /* static */ @@ -65,7 +63,6 @@ SkBitmap* ResourceBundle::LoadBitmap(DataHandle data_handle, int resource_id) { // it can handle this resource. // TODO(erikkay): It would be nice to use something less brittle than // resource_id here. -#if !defined(LINUX2) if (g_shared_instance_->theme_extension_.get()) { FilePath path = g_shared_instance_->theme_extension_->GetThemeResourcePath(resource_id); @@ -87,7 +84,6 @@ SkBitmap* ResourceBundle::LoadBitmap(DataHandle data_handle, int resource_id) { } } } -#endif if (!success) success = LoadResourceBytes(data_handle, resource_id, &raw_data); if (!success) diff --git a/chrome/common/resource_bundle.h b/chrome/common/resource_bundle.h index 2532953..77cb88d 100644 --- a/chrome/common/resource_bundle.h +++ b/chrome/common/resource_bundle.h @@ -25,7 +25,7 @@ namespace base { class DataPack; }; #endif -#if defined(TOOLKIT_GTK) +#if defined(OS_LINUX) typedef struct _GdkPixbuf GdkPixbuf; #endif class ChromeFont; @@ -113,7 +113,7 @@ class ResourceBundle { // Loads and returns a cursor from the app module. HCURSOR LoadCursor(int cursor_id); -#elif defined(TOOLKIT_GTK) +#elif defined(OS_LINUX) // Gets the GdkPixbuf with the specified resource_id, first by looking into // the theme data, than in the current module data if applicable. Returns a // pointer to a shared instance of the GdkPixbuf. This shared GdkPixbuf is @@ -183,7 +183,7 @@ class ResourceBundle { // ownership of the pointers. typedef std::map<int, SkBitmap*> SkImageMap; SkImageMap skia_images_; -#if defined(TOOLKIT_GTK) +#if defined(OS_LINUX) typedef std::map<int, GdkPixbuf*> GdkPixbufMap; GdkPixbufMap gdk_pixbufs_; #endif diff --git a/chrome/common/resource_bundle_linux.cc b/chrome/common/resource_bundle_linux.cc index e982db8..bad1da7 100644 --- a/chrome/common/resource_bundle_linux.cc +++ b/chrome/common/resource_bundle_linux.cc @@ -4,9 +4,7 @@ #include "chrome/common/resource_bundle.h" -#if defined(TOOLKIT_GTK) #include <gtk/gtk.h> -#endif #include "base/base_paths.h" #include "base/data_pack.h" @@ -25,7 +23,6 @@ namespace { -#if defined(TOOLKIT_GTK) // Convert the raw image data into a GdkPixbuf. The GdkPixbuf that is returned // has a ref count of 1 so the caller must call g_object_unref to free the // memory. @@ -51,7 +48,6 @@ GdkPixbuf* LoadPixbuf(std::vector<unsigned char>& data) { return pixbuf; } -#endif } // namespace @@ -163,7 +159,6 @@ string16 ResourceBundle::GetLocalizedString(int message_id) { return msg; } -#if defined(TOOLKIT_GTK) GdkPixbuf* ResourceBundle::GetPixbufNamed(int resource_id) { // Check to see if we already have the pixbuf in the cache. { @@ -212,4 +207,3 @@ GdkPixbuf* ResourceBundle::GetPixbufNamed(int resource_id) { return empty_bitmap; } } -#endif diff --git a/chrome/views/widget/root_view.h b/chrome/views/widget/root_view.h index 091e48d..0eaaa1d 100644 --- a/chrome/views/widget/root_view.h +++ b/chrome/views/widget/root_view.h @@ -7,7 +7,7 @@ #include "build/build_config.h" -#if defined(TOOLKIT_GTK) +#if defined(OS_LINUX) #include <gtk/gtk.h> #endif @@ -184,7 +184,7 @@ class RootView : public View, #if defined(OS_WIN) // Invoked from the Widget to service a WM_PAINT call. void OnPaint(HWND hwnd); -#elif defined(TOOLKIT_GTK) +#elif defined(OS_LINUX) void OnPaint(GdkEventExpose* event); #endif |