summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-22 01:00:21 +0000
committerzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-22 01:00:21 +0000
commit1e40513cce7a4a1de6ccad42f13d77db0e313fde (patch)
tree0b02caff0d2bc7531220e8c0e23969dfc77a3975
parentaf0b07937eb8c6faea00781ad36c4d5b5acedff6 (diff)
downloadchromium_src-1e40513cce7a4a1de6ccad42f13d77db0e313fde.zip
chromium_src-1e40513cce7a4a1de6ccad42f13d77db0e313fde.tar.gz
chromium_src-1e40513cce7a4a1de6ccad42f13d77db0e313fde.tar.bz2
Checking in CL http://www.codereview.chromium.org/2836058 on behalf of zbehan@:
chrome: create an option for using libcros provided by the system; fix all includes referring to libcros to not include third_party/ * Headers fix is needed to support using system libcros (installed to /usr/include) * All includes are "", and therefore a local variant in third_party/cros/ is always preferred, but system will also get picked up as a secondary target * Fixed chrome/browser/chromeos/cros/synaptics_library.h comments to better reflect the header placement * Added a variable system_libcros defaulting to 0 * Gotten rid of duplicate cros_api.gyp * Changed both places to either link against cros_api or libcrosapi TEST=build in the following scenarios: 1) libcros not installed, libcros sources in third_party/, !defined system_libcros - sucess 2) installed libcros, put #error into /usr/include/cros/chromeos_cros_api.h, repeat 1) - success 3) BUILD_DEFINES+=system_libcros=1, removed libcros from third_party, repeat 2) - fail (on #error in chromeos_cros_api.h) 4) Installed clean libcros, repeat 3) - success Review URL: http://codereview.chromium.org/3043010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53288 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/common.gypi5
-rw-r--r--chrome/browser/DEPS1
-rw-r--r--chrome/browser/chromeos/DEPS1
-rw-r--r--chrome/browser/chromeos/cros/cros_api.gyp18
-rw-r--r--chrome/browser/chromeos/cros/cros_in_process_browser_test.h2
-rw-r--r--chrome/browser/chromeos/cros/cros_library_loader.cc2
-rw-r--r--chrome/browser/chromeos/cros/cryptohome_library.h2
-rw-r--r--chrome/browser/chromeos/cros/input_method_library.h2
-rw-r--r--chrome/browser/chromeos/cros/keyboard_library.cc2
-rw-r--r--chrome/browser/chromeos/cros/keyboard_library.h2
-rw-r--r--chrome/browser/chromeos/cros/login_library.h2
-rw-r--r--chrome/browser/chromeos/cros/mock_mount_library.h2
-rw-r--r--chrome/browser/chromeos/cros/mount_library.h2
-rw-r--r--chrome/browser/chromeos/cros/network_library.h2
-rw-r--r--chrome/browser/chromeos/cros/power_library.h2
-rw-r--r--chrome/browser/chromeos/cros/screen_lock_library.h2
-rw-r--r--chrome/browser/chromeos/cros/speech_synthesis_library.cc2
-rw-r--r--chrome/browser/chromeos/cros/synaptics_library.h8
-rw-r--r--chrome/browser/chromeos/cros/syslogs_library.h2
-rw-r--r--chrome/browser/chromeos/cros/system_library.h2
-rw-r--r--chrome/browser/chromeos/cros/update_library.h2
-rw-r--r--chrome/browser/chromeos/frame/browser_view.cc2
-rw-r--r--chrome/browser/chromeos/frame/panel_controller.cc2
-rw-r--r--chrome/browser/chromeos/google_update_chromeos.cc2
-rw-r--r--chrome/browser/chromeos/input_method/candidate_window.cc4
-rw-r--r--chrome/browser/chromeos/input_method/candidate_window.gyp18
-rw-r--r--chrome/browser/chromeos/login/background_view.cc2
-rw-r--r--chrome/browser/chromeos/login/screen_locker.cc2
-rw-r--r--chrome/browser/chromeos/login/user_controller.cc2
-rw-r--r--chrome/browser/chromeos/login/wizard_controller.cc2
-rw-r--r--chrome/browser/chromeos/options/language_config_model.h2
-rw-r--r--chrome/browser/chromeos/panels/panel_browsertest.cc2
-rw-r--r--chrome/browser/chromeos/system_key_event_listener.cc2
-rw-r--r--chrome/browser/chromeos/wm_ipc.h2
-rw-r--r--chrome/browser/chromeos/wm_overview_fav_icon.cc2
-rw-r--r--chrome/browser/chromeos/wm_overview_title.cc2
-rw-r--r--chrome/browser/views/browser_bubble_gtk.cc2
-rw-r--r--chrome/browser/views/extensions/extension_popup.cc2
-rw-r--r--chrome/browser/views/info_bubble.cc2
-rw-r--r--chrome/chrome_browser.gypi18
40 files changed, 80 insertions, 57 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 8a9fd97..3026274 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -15,6 +15,11 @@
'internal_pdf%': 0,
+ # This allows to use libcros from the current system, ie. /usr/lib/
+ # The cros_api will be pulled in as a static library, and all headers
+ # from the system include dirs.
+ 'system_libcros%': '0',
+
# Variables expected to be overriden on the GYP command line (-D) or by
# ~/.gyp/include.gypi.
diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS
index 8625067..004846a 100644
--- a/chrome/browser/DEPS
+++ b/chrome/browser/DEPS
@@ -7,6 +7,7 @@ include_rules = [
"+chrome/profile_import",
"+chrome/tools/profiles", # For history unit tests.
"+chrome/views",
+ "+cros",
"+grit", # For generated headers
"+sandbox/src",
"+skia/include",
diff --git a/chrome/browser/chromeos/DEPS b/chrome/browser/chromeos/DEPS
index 7871d2f..29b7aa6 100644
--- a/chrome/browser/chromeos/DEPS
+++ b/chrome/browser/chromeos/DEPS
@@ -1,3 +1,4 @@
include_rules = [
"+third_party/cros",
+ "+cros",
]
diff --git a/chrome/browser/chromeos/cros/cros_api.gyp b/chrome/browser/chromeos/cros/cros_api.gyp
index 13b52ec..e69de29 100644
--- a/chrome/browser/chromeos/cros/cros_api.gyp
+++ b/chrome/browser/chromeos/cros/cros_api.gyp
@@ -1,18 +0,0 @@
-{
- 'targets': [
- { 'target_name': 'cros_api',
- 'type': '<(library)',
- 'sources': [
- '../../../../third_party/cros/chromeos_power.h',
- '../../../../third_party/cros/chromeos_network.h',
- '../../../../third_party/cros/chromeos_syslogs.h',
- '../../../../third_party/cros/load.cc',
- ],
- 'include_dirs': [
- '../../../../third_party/cros',
- '../../../../third_party',
- '../../../..',
- ],
- },
- ],
- }
diff --git a/chrome/browser/chromeos/cros/cros_in_process_browser_test.h b/chrome/browser/chromeos/cros/cros_in_process_browser_test.h
index 2b1493a..52e11db 100644
--- a/chrome/browser/chromeos/cros/cros_in_process_browser_test.h
+++ b/chrome/browser/chromeos/cros/cros_in_process_browser_test.h
@@ -8,7 +8,7 @@
#include "base/scoped_ptr.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/test/in_process_browser_test.h"
-#include "third_party/cros/chromeos_input_method.h"
+#include "cros/chromeos_input_method.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/cros/cros_library_loader.cc b/chrome/browser/chromeos/cros/cros_library_loader.cc
index d53d187..a542802 100644
--- a/chrome/browser/chromeos/cros/cros_library_loader.cc
+++ b/chrome/browser/chromeos/cros/cros_library_loader.cc
@@ -10,7 +10,7 @@
#include "base/logging.h"
#include "base/path_service.h"
#include "chrome/common/chrome_paths.h"
-#include "third_party/cros/chromeos_cros_api.h"
+#include "cros/chromeos_cros_api.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/cros/cryptohome_library.h b/chrome/browser/chromeos/cros/cryptohome_library.h
index fe3676d..6e91d30 100644
--- a/chrome/browser/chromeos/cros/cryptohome_library.h
+++ b/chrome/browser/chromeos/cros/cryptohome_library.h
@@ -8,7 +8,7 @@
#include <string>
#include "base/singleton.h"
-#include "third_party/cros/chromeos_cryptohome.h"
+#include "cros/chromeos_cryptohome.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/cros/input_method_library.h b/chrome/browser/chromeos/cros/input_method_library.h
index a7bf482..e92b311 100644
--- a/chrome/browser/chromeos/cros/input_method_library.h
+++ b/chrome/browser/chromeos/cros/input_method_library.h
@@ -12,7 +12,7 @@
#include "base/observer_list.h"
#include "base/time.h"
#include "base/timer.h"
-#include "third_party/cros/chromeos_input_method.h"
+#include "cros/chromeos_input_method.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/cros/keyboard_library.cc b/chrome/browser/chromeos/cros/keyboard_library.cc
index c9c9ab2..ff7a3b1 100644
--- a/chrome/browser/chromeos/cros/keyboard_library.cc
+++ b/chrome/browser/chromeos/cros/keyboard_library.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/chromeos/cros/keyboard_library.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
-#include "third_party/cros/chromeos_keyboard.h"
+#include "cros/chromeos_keyboard.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/cros/keyboard_library.h b/chrome/browser/chromeos/cros/keyboard_library.h
index fcdec9e..17e1b42 100644
--- a/chrome/browser/chromeos/cros/keyboard_library.h
+++ b/chrome/browser/chromeos/cros/keyboard_library.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_CHROMEOS_CROS_KEYBOARD_LIBRARY_H_
#define CHROME_BROWSER_CHROMEOS_CROS_KEYBOARD_LIBRARY_H_
-#include "third_party/cros/chromeos_keyboard.h"
+#include "cros/chromeos_keyboard.h"
#include <string>
diff --git a/chrome/browser/chromeos/cros/login_library.h b/chrome/browser/chromeos/cros/login_library.h
index df1b9b4..3e8936f 100644
--- a/chrome/browser/chromeos/cros/login_library.h
+++ b/chrome/browser/chromeos/cros/login_library.h
@@ -8,7 +8,7 @@
#include <string>
#include "base/singleton.h"
-#include "third_party/cros/chromeos_login.h"
+#include "cros/chromeos_login.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/cros/mock_mount_library.h b/chrome/browser/chromeos/cros/mock_mount_library.h
index 06023e4..e0309ea 100644
--- a/chrome/browser/chromeos/cros/mock_mount_library.h
+++ b/chrome/browser/chromeos/cros/mock_mount_library.h
@@ -10,7 +10,7 @@
#include "base/observer_list.h"
#include "base/time.h"
-#include "third_party/cros/chromeos_mount.h"
+#include "cros/chromeos_mount.h"
#include "chrome/browser/chromeos/cros/mount_library.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/browser/chromeos/cros/mount_library.h b/chrome/browser/chromeos/cros/mount_library.h
index 4223274..3fd772a 100644
--- a/chrome/browser/chromeos/cros/mount_library.h
+++ b/chrome/browser/chromeos/cros/mount_library.h
@@ -11,7 +11,7 @@
#include "base/observer_list.h"
#include "base/singleton.h"
#include "base/time.h"
-#include "third_party/cros/chromeos_mount.h"
+#include "cros/chromeos_mount.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/cros/network_library.h b/chrome/browser/chromeos/cros/network_library.h
index 8374505..9521a41 100644
--- a/chrome/browser/chromeos/cros/network_library.h
+++ b/chrome/browser/chromeos/cros/network_library.h
@@ -14,7 +14,7 @@
#include "base/string16.h"
#include "base/timer.h"
#include "net/url_request/url_request_job_tracker.h"
-#include "third_party/cros/chromeos_network.h"
+#include "cros/chromeos_network.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/cros/power_library.h b/chrome/browser/chromeos/cros/power_library.h
index dcbab8c..76ab81a 100644
--- a/chrome/browser/chromeos/cros/power_library.h
+++ b/chrome/browser/chromeos/cros/power_library.h
@@ -8,7 +8,7 @@
#include "base/observer_list.h"
#include "base/singleton.h"
#include "base/time.h"
-#include "third_party/cros/chromeos_power.h"
+#include "cros/chromeos_power.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/cros/screen_lock_library.h b/chrome/browser/chromeos/cros/screen_lock_library.h
index 21172fa..829d156 100644
--- a/chrome/browser/chromeos/cros/screen_lock_library.h
+++ b/chrome/browser/chromeos/cros/screen_lock_library.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_CHROMEOS_CROS_SCREEN_LOCK_LIBRARY_H_
#include "base/observer_list.h"
-#include "third_party/cros/chromeos_screen_lock.h"
+#include "cros/chromeos_screen_lock.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/cros/speech_synthesis_library.cc b/chrome/browser/chromeos/cros/speech_synthesis_library.cc
index b70a458..10194ee 100644
--- a/chrome/browser/chromeos/cros/speech_synthesis_library.cc
+++ b/chrome/browser/chromeos/cros/speech_synthesis_library.cc
@@ -7,7 +7,7 @@
#include "base/message_loop.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
-#include "third_party/cros/chromeos_speech_synthesis.h"
+#include "cros/chromeos_speech_synthesis.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/cros/synaptics_library.h b/chrome/browser/chromeos/cros/synaptics_library.h
index 676e0f9..3dfd69f 100644
--- a/chrome/browser/chromeos/cros/synaptics_library.h
+++ b/chrome/browser/chromeos/cros/synaptics_library.h
@@ -6,14 +6,15 @@
#define CHROME_BROWSER_CHROMEOS_CROS_SYNAPTICS_LIBRARY_H_
#include "base/singleton.h"
-#include "third_party/cros/chromeos_synaptics.h"
+#include "cros/chromeos_synaptics.h"
namespace chromeos {
// This interface defines interaction with the ChromeOS synaptics library APIs.
// Users can get an instance of this library class like this:
// SynapticsLibrary::Get()
-// For a list of SynapticsPrameters, see third_party/cros/chromeos_synaptics.h
+// For a list of SynapticsPrameters, see chromeos_synaptics.h
+// in third_party/cros or /usr/include/cros
class SynapticsLibrary {
public:
virtual ~SynapticsLibrary() {}
@@ -29,7 +30,8 @@ class SynapticsLibrary {
// This class handles the interaction with the ChromeOS synaptics library APIs.
// Users can get an instance of this library class like this:
// SynapticsLibrary::Get()
-// For a list of SynapticsPrameters, see third_party/cros/chromeos_synaptics.h
+// For a list of SynapticsPrameters, see chromeos_synaptics.h
+// in third_party/cros or /usr/include/cros
class SynapticsLibraryImpl : public SynapticsLibrary {
public:
SynapticsLibraryImpl() {}
diff --git a/chrome/browser/chromeos/cros/syslogs_library.h b/chrome/browser/chromeos/cros/syslogs_library.h
index 1d7d9ba..e29824c 100644
--- a/chrome/browser/chromeos/cros/syslogs_library.h
+++ b/chrome/browser/chromeos/cros/syslogs_library.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_CHROMEOS_CROS_SYSLOGS_LIBRARY_H_
#include "base/singleton.h"
-#include "third_party/cros/chromeos_syslogs.h"
+#include "cros/chromeos_syslogs.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/cros/system_library.h b/chrome/browser/chromeos/cros/system_library.h
index 2347785..b33eb3d 100644
--- a/chrome/browser/chromeos/cros/system_library.h
+++ b/chrome/browser/chromeos/cros/system_library.h
@@ -8,7 +8,7 @@
#include "base/observer_list.h"
#include "base/scoped_ptr.h"
#include "base/singleton.h"
-#include "third_party/cros/chromeos_system.h"
+#include "cros/chromeos_system.h"
#include "unicode/timezone.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/cros/update_library.h b/chrome/browser/chromeos/cros/update_library.h
index fe4710b..c57e7bd 100644
--- a/chrome/browser/chromeos/cros/update_library.h
+++ b/chrome/browser/chromeos/cros/update_library.h
@@ -10,7 +10,7 @@
#include "base/observer_list.h"
#include "base/singleton.h"
#include "base/time.h"
-#include "third_party/cros/chromeos_update_engine.h"
+#include "cros/chromeos_update_engine.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/frame/browser_view.cc b/chrome/browser/chromeos/frame/browser_view.cc
index 38ba12d..25ecefd 100644
--- a/chrome/browser/chromeos/frame/browser_view.cc
+++ b/chrome/browser/chromeos/frame/browser_view.cc
@@ -30,7 +30,7 @@
#include "chrome/common/chrome_switches.h"
#include "gfx/canvas.h"
#include "grit/generated_resources.h"
-#include "third_party/cros/chromeos_wm_ipc_enums.h"
+#include "cros/chromeos_wm_ipc_enums.h"
#include "views/controls/button/button.h"
#include "views/controls/button/image_button.h"
#include "views/controls/image_view.h"
diff --git a/chrome/browser/chromeos/frame/panel_controller.cc b/chrome/browser/chromeos/frame/panel_controller.cc
index 3446b38..621f63a 100644
--- a/chrome/browser/chromeos/frame/panel_controller.cc
+++ b/chrome/browser/chromeos/frame/panel_controller.cc
@@ -17,7 +17,7 @@
#include "grit/app_resources.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "third_party/cros/chromeos_wm_ipc_enums.h"
+#include "cros/chromeos_wm_ipc_enums.h"
#include "views/controls/button/image_button.h"
#include "views/controls/image_view.h"
#include "views/controls/label.h"
diff --git a/chrome/browser/chromeos/google_update_chromeos.cc b/chrome/browser/chromeos/google_update_chromeos.cc
index 7cf32cb..a7b2cc3 100644
--- a/chrome/browser/chromeos/google_update_chromeos.cc
+++ b/chrome/browser/chromeos/google_update_chromeos.cc
@@ -12,7 +12,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
-#include "third_party/cros/chromeos_update.h"
+#include "cros/chromeos_update.h"
#include "views/window/window.h"
using views::Window;
diff --git a/chrome/browser/chromeos/input_method/candidate_window.cc b/chrome/browser/chromeos/input_method/candidate_window.cc
index 9b9ee5b..2e95a20 100644
--- a/chrome/browser/chromeos/input_method/candidate_window.cc
+++ b/chrome/browser/chromeos/input_method/candidate_window.cc
@@ -26,8 +26,8 @@
#include "chrome/common/chrome_switches.h"
#include "gfx/canvas.h"
#include "gfx/font.h"
-#include "third_party/cros/chromeos_cros_api.h"
-#include "third_party/cros/chromeos_input_method_ui.h"
+#include "cros/chromeos_cros_api.h"
+#include "cros/chromeos_input_method_ui.h"
#include "views/controls/label.h"
#include "views/controls/textfield/textfield.h"
#include "views/event.h"
diff --git a/chrome/browser/chromeos/input_method/candidate_window.gyp b/chrome/browser/chromeos/input_method/candidate_window.gyp
index cecd9d7..e2f3ced 100644
--- a/chrome/browser/chromeos/input_method/candidate_window.gyp
+++ b/chrome/browser/chromeos/input_method/candidate_window.gyp
@@ -17,13 +17,29 @@
'../../../../chrome/chrome.gyp:common_constants',
'../../../../skia/skia.gyp:skia',
'../../../../views/views.gyp:views',
- '../cros/cros_api.gyp:cros_api',
],
'sources': [
'candidate_window.cc',
# For loading libcros.
'../cros/cros_library_loader.cc',
],
+ 'conditions': [
+ ['system_libcros==0', {
+ 'dependencies': [
+ '../../../../third_party/cros/cros_api.gyp:cros_api',
+ ],
+ 'include_dirs': [
+ '../../../../third_party/',
+ ],
+ }],
+ ['system_libcros==1', {
+ 'link_settings': {
+ 'libraries': [
+ '-lcrosapi',
+ ],
+ },
+ }],
+ ],
},
],
}
diff --git a/chrome/browser/chromeos/login/background_view.cc b/chrome/browser/chromeos/login/background_view.cc
index 987e5f1..3d9f954 100644
--- a/chrome/browser/chromeos/login/background_view.cc
+++ b/chrome/browser/chromeos/login/background_view.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/chromeos/status/network_menu_button.h"
#include "chrome/browser/chromeos/status/status_area_view.h"
#include "chrome/browser/chromeos/wm_ipc.h"
-#include "third_party/cros/chromeos_wm_ipc_enums.h"
+#include "cros/chromeos_wm_ipc_enums.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "views/controls/label.h"
diff --git a/chrome/browser/chromeos/login/screen_locker.cc b/chrome/browser/chromeos/login/screen_locker.cc
index 617e005..ebd120d 100644
--- a/chrome/browser/chromeos/login/screen_locker.cc
+++ b/chrome/browser/chromeos/login/screen_locker.cc
@@ -29,7 +29,7 @@
#include "chrome/common/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "third_party/cros/chromeos_wm_ipc_enums.h"
+#include "cros/chromeos_wm_ipc_enums.h"
#include "views/screen.h"
#include "views/widget/root_view.h"
#include "views/widget/widget_gtk.h"
diff --git a/chrome/browser/chromeos/login/user_controller.cc b/chrome/browser/chromeos/login/user_controller.cc
index 41634d8..e7de077 100644
--- a/chrome/browser/chromeos/login/user_controller.cc
+++ b/chrome/browser/chromeos/login/user_controller.cc
@@ -18,7 +18,7 @@
#include "gfx/canvas.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "third_party/cros/chromeos_wm_ipc_enums.h"
+#include "cros/chromeos_wm_ipc_enums.h"
#include "views/background.h"
#include "views/controls/label.h"
#include "views/controls/button/native_button.h"
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
index c9550ef..8506921 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -39,7 +39,7 @@
#include "chrome/browser/profile_manager.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/notification_service.h"
-#include "third_party/cros/chromeos_wm_ipc_enums.h"
+#include "cros/chromeos_wm_ipc_enums.h"
#include "unicode/timezone.h"
#include "views/accelerator.h"
#include "views/painter.h"
diff --git a/chrome/browser/chromeos/options/language_config_model.h b/chrome/browser/chromeos/options/language_config_model.h
index ec79bc6..352208c4 100644
--- a/chrome/browser/chromeos/options/language_config_model.h
+++ b/chrome/browser/chromeos/options/language_config_model.h
@@ -15,7 +15,7 @@
#include "chrome/browser/pref_service.h"
#include "chrome/browser/profile.h"
#include "chrome/common/notification_service.h"
-#include "third_party/cros/chromeos_input_method.h"
+#include "cros/chromeos_input_method.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/panels/panel_browsertest.cc b/chrome/browser/chromeos/panels/panel_browsertest.cc
index 315860c..d89204b 100644
--- a/chrome/browser/chromeos/panels/panel_browsertest.cc
+++ b/chrome/browser/chromeos/panels/panel_browsertest.cc
@@ -13,7 +13,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/test/in_process_browser_test.h"
#include "chrome/test/ui_test_utils.h"
-#include "third_party/cros/chromeos_wm_ipc_enums.h"
+#include "cros/chromeos_wm_ipc_enums.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/system_key_event_listener.cc b/chrome/browser/chromeos/system_key_event_listener.cc
index 24bfa3e..21f28f2 100644
--- a/chrome/browser/chromeos/system_key_event_listener.cc
+++ b/chrome/browser/chromeos/system_key_event_listener.cc
@@ -6,7 +6,7 @@
#include "chrome/browser/chromeos/audio_handler.h"
#include "chrome/browser/chromeos/volume_bubble.h"
-#include "third_party/cros/chromeos_wm_ipc_enums.h"
+#include "cros/chromeos_wm_ipc_enums.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/wm_ipc.h b/chrome/browser/chromeos/wm_ipc.h
index 2105803..6161749f 100644
--- a/chrome/browser/chromeos/wm_ipc.h
+++ b/chrome/browser/chromeos/wm_ipc.h
@@ -12,7 +12,7 @@
#include "base/logging.h"
#include "base/singleton.h"
-#include "third_party/cros/chromeos_wm_ipc_enums.h"
+#include "cros/chromeos_wm_ipc_enums.h"
typedef unsigned long Atom;
typedef unsigned long XID;
diff --git a/chrome/browser/chromeos/wm_overview_fav_icon.cc b/chrome/browser/chromeos/wm_overview_fav_icon.cc
index ad9dfa8..0568932 100644
--- a/chrome/browser/chromeos/wm_overview_fav_icon.cc
+++ b/chrome/browser/chromeos/wm_overview_fav_icon.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/chromeos/wm_ipc.h"
#include "chrome/browser/chromeos/wm_overview_snapshot.h"
#include "skia/ext/image_operations.h"
-#include "third_party/cros/chromeos_wm_ipc_enums.h"
+#include "cros/chromeos_wm_ipc_enums.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "views/controls/image_view.h"
#include "views/controls/label.h"
diff --git a/chrome/browser/chromeos/wm_overview_title.cc b/chrome/browser/chromeos/wm_overview_title.cc
index 1c4a249..2c21bc6 100644
--- a/chrome/browser/chromeos/wm_overview_title.cc
+++ b/chrome/browser/chromeos/wm_overview_title.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/chromeos/drop_shadow_label.h"
#include "chrome/browser/chromeos/wm_ipc.h"
#include "chrome/browser/chromeos/wm_overview_snapshot.h"
-#include "third_party/cros/chromeos_wm_ipc_enums.h"
+#include "cros/chromeos_wm_ipc_enums.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "views/border.h"
#include "views/grid_layout.h"
diff --git a/chrome/browser/views/browser_bubble_gtk.cc b/chrome/browser/views/browser_bubble_gtk.cc
index 63420d2..3bbd61a 100644
--- a/chrome/browser/views/browser_bubble_gtk.cc
+++ b/chrome/browser/views/browser_bubble_gtk.cc
@@ -10,7 +10,7 @@
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/wm_ipc.h"
-#include "third_party/cros/chromeos_wm_ipc_enums.h"
+#include "cros/chromeos_wm_ipc_enums.h"
#endif
namespace {
diff --git a/chrome/browser/views/extensions/extension_popup.cc b/chrome/browser/views/extensions/extension_popup.cc
index a669d69..f9b1a26 100644
--- a/chrome/browser/views/extensions/extension_popup.cc
+++ b/chrome/browser/views/extensions/extension_popup.cc
@@ -29,7 +29,7 @@
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/wm_ipc.h"
-#include "third_party/cros/chromeos_wm_ipc_enums.h"
+#include "cros/chromeos_wm_ipc_enums.h"
#endif
using views::Widget;
diff --git a/chrome/browser/views/info_bubble.cc b/chrome/browser/views/info_bubble.cc
index 34645a0..48b7626 100644
--- a/chrome/browser/views/info_bubble.cc
+++ b/chrome/browser/views/info_bubble.cc
@@ -19,7 +19,7 @@
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/wm_ipc.h"
-#include "third_party/cros/chromeos_wm_ipc_enums.h"
+#include "cros/chromeos_wm_ipc_enums.h"
#endif
// How long the fade should last for.
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 57e2996..c25182b 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -3517,7 +3517,23 @@
'../third_party/protobuf2/protobuf.gyp:protobuf_lite',
#'../third_party/protobuf2/protobuf.gyp:protobuf',
'../third_party/protobuf2/protobuf.gyp:protoc#host',
- '../third_party/cros/cros_api.gyp:cros_api',
+ ],
+ 'conditions': [
+ ['system_libcros==0', {
+ 'dependencies': [
+ '../third_party/cros/cros_api.gyp:cros_api',
+ ],
+ 'include_dirs': [
+ '../third_party/'
+ ],
+ }],
+ ['system_libcros==1', {
+ 'link_settings': {
+ 'libraries': [
+ '-lcrosapi',
+ ],
+ },
+ }],
],
'actions': [
{