diff options
Diffstat (limited to 'chrome/common')
-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 | 4 | ||||
-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 | 2 | ||||
-rw-r--r-- | chrome/common/resource_bundle_linux.cc | 4 |
7 files changed, 19 insertions, 7 deletions
diff --git a/chrome/common/chrome_paths_linux.cc b/chrome/common/chrome_paths_linux.cc index d3ce207..b1151c5 100644 --- a/chrome/common/chrome_paths_linux.cc +++ b/chrome/common/chrome_paths_linux.cc @@ -4,7 +4,9 @@ #include "chrome/common/chrome_paths_internal.h" +#if defined(TOOLKIT_GTK) #include <glib.h> +#endif #include <stdlib.h> #include "base/file_path.h" @@ -19,9 +21,11 @@ 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 cf6db1e..84671f1 100644 --- a/chrome/common/gfx/chrome_canvas.h +++ b/chrome/common/gfx/chrome_canvas.h @@ -188,7 +188,7 @@ class ChromeCanvas : public skia::PlatformCanvas { DISALLOW_EVIL_CONSTRUCTORS(ChromeCanvas); }; -#if defined(OS_WIN) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(TOOLKIT_GTK) typedef skia::CanvasPaintT<ChromeCanvas> ChromeCanvasPaint; #endif diff --git a/chrome/common/gfx/path.h b/chrome/common/gfx/path.h index 5003132..7d6d3a0 100644 --- a/chrome/common/gfx/path.h +++ b/chrome/common/gfx/path.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -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(OS_LINUX) +#elif defined(TOOLKIT_GTK) // 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 0400b41..c055528 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(OS_LINUX) +#elif defined(TOOLKIT_GTK) #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(OS_LINUX) +#elif defined(TOOLKIT_GTK) 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(OS_LINUX) +#elif defined(TOOLKIT_GTK) GdkEventKey* os_event; #endif }; diff --git a/chrome/common/resource_bundle.cc b/chrome/common/resource_bundle.cc index 3ffc026..f87560d 100644 --- a/chrome/common/resource_bundle.cc +++ b/chrome/common/resource_bundle.cc @@ -52,7 +52,9 @@ void ResourceBundle::FreeImages() { } void ResourceBundle::SetThemeExtension(const Extension& e) { +#if !defined(LINUX2) theme_extension_.reset(new Extension(e)); +#endif } /* static */ @@ -63,6 +65,7 @@ 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); @@ -84,6 +87,7 @@ 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 2305bbc..76b9252 100644 --- a/chrome/common/resource_bundle.h +++ b/chrome/common/resource_bundle.h @@ -114,7 +114,7 @@ class ResourceBundle { // Loads and returns a cursor from the app module. HCURSOR LoadCursor(int cursor_id); -#elif defined(OS_LINUX) +#elif defined(TOOLKIT_GTK) // Load a theme image as a GdkPixbuf. GdkPixbuf* LoadPixbuf(int resource_id); #endif diff --git a/chrome/common/resource_bundle_linux.cc b/chrome/common/resource_bundle_linux.cc index 0a5112f..009b5d3 100644 --- a/chrome/common/resource_bundle_linux.cc +++ b/chrome/common/resource_bundle_linux.cc @@ -4,7 +4,9 @@ #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" @@ -120,6 +122,7 @@ std::wstring ResourceBundle::GetLocalizedString(int message_id) { return UTF16ToWide(msg); } +#if defined(TOOLKIT_GTK) GdkPixbuf* ResourceBundle::LoadPixbuf(int resource_id) { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); std::vector<unsigned char> data; @@ -143,3 +146,4 @@ GdkPixbuf* ResourceBundle::LoadPixbuf(int resource_id) { return pixbuf; } +#endif |