summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-08 16:16:27 +0000
committerpinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-08 16:16:27 +0000
commitc584d23517df68ea4049207d8b3cb129a402bc5f (patch)
treeba5422ebbae27b7cd62b49a56ab6f8237179d275
parent5a5ad998d56dce29a2431b4b77a8369b46ad4ca9 (diff)
downloadchromium_src-c584d23517df68ea4049207d8b3cb129a402bc5f.zip
chromium_src-c584d23517df68ea4049207d8b3cb129a402bc5f.tar.gz
chromium_src-c584d23517df68ea4049207d8b3cb129a402bc5f.tar.bz2
Replace stub bogus_webkit_strings.h with real generated header via grit
Review URL: http://codereview.chromium.org/17267 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7733 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/bogus_webkit_strings.h40
-rw-r--r--webkit/glue/localized_strings.cc7
-rw-r--r--webkit/tools/test_shell/mac/TestShell.xcodeproj/project.pbxproj2
-rw-r--r--webkit/tools/test_shell/test_shell.cc5
-rwxr-xr-xwebkit/webkit.xcodeproj/glue_prebuild.sh20
-rw-r--r--webkit/webkit.xcodeproj/project.pbxproj17
6 files changed, 39 insertions, 52 deletions
diff --git a/webkit/glue/bogus_webkit_strings.h b/webkit/glue/bogus_webkit_strings.h
deleted file mode 100644
index 790883f..0000000
--- a/webkit/glue/bogus_webkit_strings.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2008 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.
-
-#ifndef WEBKIT_GLUE_BOGUS_WEBKIT_STRINGS_H_
-#define WEBKIT_GLUE_BOGUS_WEBKIT_STRINGS_H_
-
-// TODO(pinkerton): This file is temporary for bootstrapping mac&linux.
-//
-// The real webkit_strings.h is generated from a .grd file to create a .h file
-// and the associated resource file. We don't have the GRIT machinery on the
-// Mac (yet) so we cheat here by defining a whole bunch of constants. The calls
-// to webkit_glue::GetLocalizedString will actually try to use NSBundle to load
-// them. It'll fail at runtime, harshly.
-
-
-#define IDS_SEARCHABLE_INDEX_INTRO 1
-#define IDS_FORM_SUBMIT_LABEL 2
-#define IDS_FORM_INPUT_ALT 3
-#define IDS_FORM_RESET_LABEL 4
-#define IDS_FORM_FILE_BUTTON_LABEL 5
-#define IDS_FORM_FILE_NO_FILE_LABEL 6
-#define IDS_RECENT_SEARCHES_NONE 7
-#define IDS_RECENT_SEARCHES 8
-#define IDS_RECENT_SEARCHES_CLEAR 9
-#define IDS_AX_ROLE_WEB_AREA 10
-#define IDS_AX_ROLE_LINK 11
-#define IDS_AX_ROLE_LIST_MARKER 12
-#define IDS_AX_ROLE_IMAGE_MAP 13
-#define IDS_AX_ROLE_HEADING 14
-#define IDS_AX_BUTTON_ACTION_VERB 15
-#define IDS_AX_RADIO_BUTTON_ACTION_VERB 16
-#define IDS_AX_TEXT_FIELD_ACTION_VERB 17
-#define IDS_AX_CHECKED_CHECK_BOX_ACTION_VERB 18
-#define IDS_AX_UNCHECKED_CHECK_BOX_ACTION_VERB 19
-#define IDS_AX_LINK_ACTION_VERB 20
-#define IDS_KEYGEN_HIGH_GRADE_KEY 21
-#define IDS_KEYGEN_MED_GRADE_KEY 22
-
-#endif // WEBKIT_GLUE_BOGUS_WEBKIT_STRINGS_H_
diff --git a/webkit/glue/localized_strings.cc b/webkit/glue/localized_strings.cc
index 90038a2..957b42ed 100644
--- a/webkit/glue/localized_strings.cc
+++ b/webkit/glue/localized_strings.cc
@@ -37,14 +37,7 @@
#include "base/string_util.h"
#include "build/build_config.h"
#include "webkit/glue/glue_util.h"
-
-#if defined(OS_MACOSX)
-// TODO:(pinkerton): only windows has the GRIT machinery, so we've created a
-// temporary generated header until we can figure out the l10n strategy.
-#include "bogus_webkit_strings.h"
-#else
#include "webkit_strings.h"
-#endif
using namespace WebCore;
diff --git a/webkit/tools/test_shell/mac/TestShell.xcodeproj/project.pbxproj b/webkit/tools/test_shell/mac/TestShell.xcodeproj/project.pbxproj
index 01cd42c..0a72744 100644
--- a/webkit/tools/test_shell/mac/TestShell.xcodeproj/project.pbxproj
+++ b/webkit/tools/test_shell/mac/TestShell.xcodeproj/project.pbxproj
@@ -2297,6 +2297,7 @@
../../../../third_party/WebKit/WebCore,
../../../../third_party/WebKit/WebKit/mac/WebCoreSupport,
"$(SYMROOT)/webkit.build/$(CONFIGURATION)/generated/WebCore/v8",
+ "$(SYMROOT)/webkit.build/$(CONFIGURATION)/generated/grit",
../../../../third_party/WebKit/JavaScriptCore,
);
INFOPLIST_FILE = Info.plist;
@@ -2332,6 +2333,7 @@
../../../../third_party/WebKit/WebCore,
../../../../third_party/WebKit/WebKit/mac/WebCoreSupport,
"$(SYMROOT)/webkit.build/$(CONFIGURATION)/generated/WebCore/v8",
+ "$(SYMROOT)/webkit.build/$(CONFIGURATION)/generated/grit",
../../../../third_party/WebKit/JavaScriptCore,
);
INFOPLIST_FILE = Info.plist;
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index c745db3..d3433fc 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -37,12 +37,7 @@
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
#include "webkit/tools/test_shell/test_navigation_controller.h"
#include "webkit/tools/test_shell/test_shell_switches.h"
-
-#if defined(OS_MACOSX)
-#include "webkit/glue/bogus_webkit_strings.h"
-#elif defined(OS_WIN) || defined(OS_LINUX)
#include "webkit_strings.h"
-#endif
#include "SkBitmap.h"
diff --git a/webkit/webkit.xcodeproj/glue_prebuild.sh b/webkit/webkit.xcodeproj/glue_prebuild.sh
new file mode 100755
index 0000000..fbfb30f
--- /dev/null
+++ b/webkit/webkit.xcodeproj/glue_prebuild.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# 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.
+
+set -ex
+GENERATED_DIR="${CONFIGURATION_TEMP_DIR}/generated"
+GRIT_DIR="${GENERATED_DIR}/grit"
+mkdir -p "${GRIT_DIR}"
+
+# compare webkit_strings.grd to webkit_strings.h. If the .h is
+# older or doesn't exist, rebuild it.
+if [ "${GRIT_DIR}/webkit_strings.h" -ot \
+ "${PROJECT_DIR}/glue/webkit_strings.grd" ]
+then
+ python "${PROJECT_DIR}/../tools/grit/grit.py" \
+ -i "${PROJECT_DIR}/glue/webkit_strings.grd" build \
+ -o "${GRIT_DIR}"
+fi
diff --git a/webkit/webkit.xcodeproj/project.pbxproj b/webkit/webkit.xcodeproj/project.pbxproj
index aab03d1..b71c9d6 100644
--- a/webkit/webkit.xcodeproj/project.pbxproj
+++ b/webkit/webkit.xcodeproj/project.pbxproj
@@ -7970,6 +7970,7 @@
isa = PBXNativeTarget;
buildConfigurationList = E45627120E268F03005E4685 /* Build configuration list for PBXNativeTarget "glue" */;
buildPhases = (
+ E43A75A70F164FAA00ABD5D1 /* Pre-build */,
E45626F20E268F03005E4685 /* Sources */,
E45627110E268F03005E4685 /* Frameworks */,
);
@@ -8120,6 +8121,20 @@
shellScript = "set -ex\nexec \"${PROJECT_FILE_PATH}/${PRODUCT_NAME}_prebuild.sh\"\n";
showEnvVarsInLog = 0;
};
+ E43A75A70F164FAA00ABD5D1 /* Pre-build */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Pre-build";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "set -ex\nexec \"${PROJECT_FILE_PATH}/${PRODUCT_NAME}_prebuild.sh\" \"${@}\"";
+ };
E456203F0E268E87005E4685 /* Pre-Build */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -10000,6 +10015,7 @@
"$(CONFIGURATION_TEMP_DIR)/generated/DerivedSources/v8/bindings",
"$(CONFIGURATION_TEMP_DIR)/generated/DerivedSources/v8/WebCore",
"$(CONFIGURATION_TEMP_DIR)/generated/include/v8",
+ "$(CONFIGURATION_TEMP_DIR)/generated/grit",
"$(CONFIGURATION_TEMP_DIR)/generated/WebCore/v8",
);
PRODUCT_NAME = glue;
@@ -10016,6 +10032,7 @@
"$(CONFIGURATION_TEMP_DIR)/generated/DerivedSources/v8/bindings",
"$(CONFIGURATION_TEMP_DIR)/generated/DerivedSources/v8/WebCore",
"$(CONFIGURATION_TEMP_DIR)/generated/include/v8",
+ "$(CONFIGURATION_TEMP_DIR)/generated/grit",
"$(CONFIGURATION_TEMP_DIR)/generated/WebCore/v8",
);
PRODUCT_NAME = glue;