summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/extensions/extension_messages_unittest.cc6
-rwxr-xr-xchrome/browser/resources/extensions_toolstrip.css5
-rw-r--r--chrome/renderer/extensions/extension_process_bindings.cc4
-rwxr-xr-xchrome/renderer/extensions/renderer_extension_bindings.cc6
-rwxr-xr-xchrome/renderer/extensions/renderer_extension_bindings.h4
-rwxr-xr-xchrome/renderer/renderer_resources.grd4
-rw-r--r--chrome/renderer/resources/extension_process_bindings.js8
-rw-r--r--chrome/renderer/resources/renderer_extension_bindings.js8
-rw-r--r--chrome/renderer/user_script_slave.cc6
-rw-r--r--webkit/glue/webview.h6
-rw-r--r--webkit/glue/webview_impl.cc8
-rw-r--r--webkit/glue/webview_impl.h1
12 files changed, 16 insertions, 50 deletions
diff --git a/chrome/browser/extensions/extension_messages_unittest.cc b/chrome/browser/extensions/extension_messages_unittest.cc
index 009d574..565f664 100644
--- a/chrome/browser/extensions/extension_messages_unittest.cc
+++ b/chrome/browser/extensions/extension_messages_unittest.cc
@@ -15,7 +15,7 @@ TEST_F(RenderViewTest, ExtensionMessagesOpenChannel) {
ExecuteJavaScript(
"var e = new chromium.Extension('foobar');"
"var port = e.connect();"
- "port.onMessage.addListener(doOnMessage);"
+ "port.onmessage.addListener(doOnMessage);"
"port.postMessage({message: 'content ready'});"
"function doOnMessage(msg, port) {"
" alert('content got: ' + msg.val);"
@@ -56,8 +56,8 @@ TEST_F(RenderViewTest, ExtensionMessagesOpenChannel) {
TEST_F(RenderViewTest, ExtensionMessagesOnConnect) {
LoadHTML("<body></body>");
ExecuteJavaScript(
- "chromium.self.onConnect.addListener(function (port) {"
- " port.onMessage.addListener(doOnMessage);"
+ "chromium.onconnect.addListener(function (port) {"
+ " port.onmessage.addListener(doOnMessage);"
" port.postMessage({message: 'onconnect'});"
"});"
"function doOnMessage(msg, port) {"
diff --git a/chrome/browser/resources/extensions_toolstrip.css b/chrome/browser/resources/extensions_toolstrip.css
index 921f97f..a8a332d 100755
--- a/chrome/browser/resources/extensions_toolstrip.css
+++ b/chrome/browser/resources/extensions_toolstrip.css
@@ -10,7 +10,6 @@ body {
#main {
background: -webkit-gradient(linear, left top, left bottom, from(rgb(222, 234, 248)), to(rgb(237, 244, 252)));
padding-top: 3px;
- height: 21px;
- overflow: hidden;
- white-space: nowrap;
+ height:19px;
+ overflow:hidden;
}
diff --git a/chrome/renderer/extensions/extension_process_bindings.cc b/chrome/renderer/extensions/extension_process_bindings.cc
index 3f53898..0e47b23 100644
--- a/chrome/renderer/extensions/extension_process_bindings.cc
+++ b/chrome/renderer/extensions/extension_process_bindings.cc
@@ -6,7 +6,6 @@
#include "chrome/common/render_messages.h"
#include "chrome/renderer/extensions/bindings_utils.h"
-#include "chrome/renderer/extensions/renderer_extension_bindings.h"
#include "chrome/renderer/js_only_v8_extensions.h"
#include "chrome/renderer/render_view.h"
#include "grit/renderer_resources.h"
@@ -22,8 +21,7 @@ const char kExtensionName[] = "chrome/ExtensionProcessBindings";
const char* kExtensionDeps[] = {
BaseJsV8Extension::kName,
JsonJsV8Extension::kName,
- JsonSchemaJsV8Extension::kName,
- RendererExtensionBindings::kName,
+ JsonSchemaJsV8Extension::kName
};
class ExtensionImpl : public v8::Extension {
diff --git a/chrome/renderer/extensions/renderer_extension_bindings.cc b/chrome/renderer/extensions/renderer_extension_bindings.cc
index 8035422..d9a73e6 100755
--- a/chrome/renderer/extensions/renderer_extension_bindings.cc
+++ b/chrome/renderer/extensions/renderer_extension_bindings.cc
@@ -27,12 +27,13 @@ namespace {
// We use the generic interface so that unit tests can inject a mock.
RenderThreadBase* render_thread_ = NULL;
+const char* kExtensionName = "chrome/RendererExtensionBindings";
const char* kExtensionDeps[] = { EventBindings::kName };
class ExtensionImpl : public v8::Extension {
public:
ExtensionImpl()
- : v8::Extension(RendererExtensionBindings::kName,
+ : v8::Extension(kExtensionName,
GetStringResource<IDR_RENDERER_EXTENSION_BINDINGS_JS>(),
arraysize(kExtensionDeps), kExtensionDeps) {
}
@@ -75,9 +76,6 @@ class ExtensionImpl : public v8::Extension {
} // namespace
-const char* RendererExtensionBindings::kName =
- "chrome/RendererExtensionBindings";
-
v8::Extension* RendererExtensionBindings::Get(RenderThreadBase* render_thread) {
render_thread_ = render_thread;
return new ExtensionImpl();
diff --git a/chrome/renderer/extensions/renderer_extension_bindings.h b/chrome/renderer/extensions/renderer_extension_bindings.h
index 3fc1fb4..5ff474e 100755
--- a/chrome/renderer/extensions/renderer_extension_bindings.h
+++ b/chrome/renderer/extensions/renderer_extension_bindings.h
@@ -15,10 +15,6 @@ class RenderThreadBase;
// used by both web renderers and extension processes.
class RendererExtensionBindings {
public:
- // Name of extension, for dependencies.
- static const char* kName;
-
- // Creates an instance of the extension.
static v8::Extension* Get(RenderThreadBase* render_thread);
// Notify any listeners that a message channel has been opened to this
diff --git a/chrome/renderer/renderer_resources.grd b/chrome/renderer/renderer_resources.grd
index cda253b..e7084d5 100755
--- a/chrome/renderer/renderer_resources.grd
+++ b/chrome/renderer/renderer_resources.grd
@@ -1,6 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- This comment is only here because changes to resources are not picked up
-without changes to the corresponding grd file. -->
<grit latest_public_release="0" current_release="1">
<outputs>
<output filename="grit/renderer_resources.h" type="rc_header">
@@ -21,4 +19,4 @@ without changes to the corresponding grd file. -->
<include name="IDR_RENDERER_EXTENSION_BINDINGS_JS" file="resources\renderer_extension_bindings.js" type="BINDATA" />
</includes>
</release>
-</grit>
+</grit> \ No newline at end of file
diff --git a/chrome/renderer/resources/extension_process_bindings.js b/chrome/renderer/resources/extension_process_bindings.js
index 454a9b0..ff7ac7e 100644
--- a/chrome/renderer/resources/extension_process_bindings.js
+++ b/chrome/renderer/resources/extension_process_bindings.js
@@ -66,8 +66,6 @@ var chromium;
request(sargs, callbackId);
}
- //----------------------------------------------------------------------------
-
// Tabs
chromium.tabs = {};
// TODO(aa): This should eventually take an optional windowId param.
@@ -129,10 +127,4 @@ var chromium;
chromium.tabs.removeTab.params = [
chromium.types.pInt
];
-
- //----------------------------------------------------------------------------
-
- // Self
- chromium.self = {};
- chromium.self.onConnect = new chromium.Event("channel-connect");
})();
diff --git a/chrome/renderer/resources/renderer_extension_bindings.js b/chrome/renderer/resources/renderer_extension_bindings.js
index fafd491..a392cf0 100644
--- a/chrome/renderer/resources/renderer_extension_bindings.js
+++ b/chrome/renderer/resources/renderer_extension_bindings.js
@@ -10,10 +10,10 @@ var chromium = chromium || {};
throw new Error("Port '" + portId + "' already exists.");
}
this.portId_ = portId; // TODO(mpcomplete): readonly
- this.onMessage = new chromium.Event();
+ this.onmessage = new chromium.Event();
chromium.Port.ports_[portId] = this;
// Note: this object will never get GCed. If we ever care, we could
- // add an "ondetach" method to the onMessage Event that gets called
+ // add an "ondetach" method to the onmessage Event that gets called
// when there are no more listeners.
};
@@ -33,7 +33,7 @@ var chromium = chromium || {};
if (msg) {
msg = goog.json.parse(msg);
}
- port.onMessage.dispatch(msg, port);
+ port.onmessage.dispatch(msg, port);
}
};
@@ -62,4 +62,6 @@ var chromium = chromium || {};
chromium.Extension.prototype.getURL = function(path) {
return "chrome-extension://" + this.id_ + "/" + path;
};
+
+ chromium.onconnect = new chromium.Event("channel-connect");
})();
diff --git a/chrome/renderer/user_script_slave.cc b/chrome/renderer/user_script_slave.cc
index 651e9ad..bd5a988 100644
--- a/chrome/renderer/user_script_slave.cc
+++ b/chrome/renderer/user_script_slave.cc
@@ -25,9 +25,7 @@ using WebKit::WebString;
static const char kUserScriptHead[] = "(function (unsafeWindow) {\n";
static const char kUserScriptTail[] = "\n})(window);";
-// Creates a convenient reference to a content script's parent extension.
-static const char kInitExtension[] =
- "chromium.extension = new chromium.Extension('%s')";
+static const char kInitSelf[] = "chromium.self = new chromium.Extension('%s')";
UserScriptSlave::UserScriptSlave()
: shared_memory_(NULL),
@@ -155,7 +153,7 @@ bool UserScriptSlave::InjectScripts(WebFrame* frame,
// ID.
sources.insert(sources.begin(),
WebScriptSource(WebString::fromUTF8(
- StringPrintf(kInitExtension, script->extension_id().c_str()))));
+ StringPrintf(kInitSelf, script->extension_id().c_str()))));
}
frame->ExecuteScriptInNewContext(&sources.front(), sources.size());
diff --git a/webkit/glue/webview.h b/webkit/glue/webview.h
index 3ecafc0..99ad41e 100644
--- a/webkit/glue/webview.h
+++ b/webkit/glue/webview.h
@@ -102,12 +102,6 @@ class WebView : public WebWidget {
// ---- TODO(darin): remove from here ----
- // TODO(mpcomplete): remove this before Chrome extensions ship.
- // HACK. This is a temporary workaround to allow cross-origin XHR for
- // Chrome extensions. It allows no fine-grained control over what origins
- // are accessible, instead granting access to everything (include file URLs).
- virtual void AllowCrossOriginAccessHack() = 0;
-
//
// - (IBAction)stopLoading:(id)sender;
virtual void StopLoading() = 0;
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index e19f16c..ce6d05d 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -342,8 +342,6 @@ WebView* WebView::Create(WebViewDelegate* delegate,
new WebDevToolsAgentImpl(instance, tools_delegate));
}
- instance->page_->settings()->setWebSecurityEnabled(false);
-
// Restrict the access to the local file system
// (see WebView.mm WebView::_commonInitializationWithFrameName).
FrameLoader::setLocalLoadPolicy(
@@ -397,12 +395,6 @@ WebViewImpl::~WebViewImpl() {
}
}
-void WebViewImpl::AllowCrossOriginAccessHack() {
- DCHECK(page_.get());
- if (page_.get())
- page_->settings()->setWebSecurityEnabled(false);
-}
-
void WebViewImpl::SetUseEditorDelegate(bool value) {
ASSERT(page_ != 0); // The macro doesn't like (!page_) with a scoped_ptr.
ASSERT(page_->editorClient());
diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h
index 69338c8..c0ce294 100644
--- a/webkit/glue/webview_impl.h
+++ b/webkit/glue/webview_impl.h
@@ -54,7 +54,6 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> {
virtual bool ShouldClose();
virtual void Close();
virtual WebViewDelegate* GetDelegate();
- virtual void AllowCrossOriginAccessHack();
virtual void SetDelegate(WebViewDelegate*);
virtual void SetUseEditorDelegate(bool value);
virtual void SetTabKeyCyclesThroughElements(bool value);