Merge from Chromium at DEPS revision 260458

This commit was generated by merge_to_master.py.

Change-Id: I01166d4072567f174b02707d7a0850cb3fe1fd8a
diff --git a/public/web/WebAutofillClient.h b/public/web/WebAutofillClient.h
index 4a5ad60..d57d591 100644
--- a/public/web/WebAutofillClient.h
+++ b/public/web/WebAutofillClient.h
@@ -31,11 +31,12 @@
 #ifndef WebAutofillClient_h
 #define WebAutofillClient_h
 
+#include "WebFrame.h"
+
 namespace blink {
 
 class WebFormControlElement;
 class WebFormElement;
-class WebFrame;
 class WebInputElement;
 class WebKeyboardEvent;
 class WebNode;
@@ -45,13 +46,10 @@
 class WebAutofillClient {
 public:
     // Informs the browser an interactive autocomplete has been requested.
-    virtual void didRequestAutocomplete(WebFrame*, const WebFormElement&) { }
+    virtual void didRequestAutocomplete(WebLocalFrame*, const WebFormElement&) { }
 
     // These methods are called when the users edits a text-field.
     virtual void textFieldDidEndEditing(const WebInputElement&) { }
-    // FIXME: This function is to be removed once both chromium and blink changes
-    // for BUG332557 are in.
-    virtual void textFieldDidChange(const WebInputElement&) { }
     virtual void textFieldDidChange(const WebFormControlElement&) { }
     virtual void textFieldDidReceiveKeyDown(const WebInputElement&, const WebKeyboardEvent&) { }
     // This is called when a datalist indicator is clicked.
diff --git a/public/web/WebDOMCustomEvent.h b/public/web/WebDOMCustomEvent.h
index e6f2f67..f818963 100644
--- a/public/web/WebDOMCustomEvent.h
+++ b/public/web/WebDOMCustomEvent.h
@@ -35,7 +35,6 @@
 
 namespace blink {
 
-class WebFrame;
 class WebString;
 
 class WebDOMCustomEvent : public WebDOMEvent {
diff --git a/public/web/WebDOMEvent.h b/public/web/WebDOMEvent.h
index 4be814f..152a102 100644
--- a/public/web/WebDOMEvent.h
+++ b/public/web/WebDOMEvent.h
@@ -90,7 +90,6 @@
     BLINK_EXPORT bool isPopStateEvent() const;
     BLINK_EXPORT bool isProgressEvent() const;
     BLINK_EXPORT bool isXMLHttpRequestProgressEvent() const;
-    BLINK_EXPORT bool isBeforeLoadEvent() const;
 
 #if BLINK_IMPLEMENTATION
     WebDOMEvent(const WTF::PassRefPtr<WebCore::Event>&);
diff --git a/public/web/WebDOMFileSystem.h b/public/web/WebDOMFileSystem.h
index 5279cc0..aa32652 100644
--- a/public/web/WebDOMFileSystem.h
+++ b/public/web/WebDOMFileSystem.h
@@ -35,6 +35,7 @@
 #include "../platform/WebPrivatePtr.h"
 #include "../platform/WebString.h"
 #include "../platform/WebURL.h"
+#include "WebFrame.h"
 
 #if BLINK_IMPLEMENTATION
 #include "heap/Handle.h"
@@ -49,8 +50,6 @@
 
 namespace blink {
 
-class WebFrame;
-
 class WebDOMFileSystem {
 public:
     enum SerializableType {
@@ -77,7 +76,7 @@
     // FIXME: Deprecate the last argument when all filesystems become
     // serializable.
     BLINK_EXPORT static WebDOMFileSystem create(
-        WebFrame*,
+        WebLocalFrame*,
         WebFileSystemType,
         const WebString& name,
         const WebURL& rootURL,
diff --git a/public/web/WebDevToolsAgent.h b/public/web/WebDevToolsAgent.h
index 73a8f82..de71176 100644
--- a/public/web/WebDevToolsAgent.h
+++ b/public/web/WebDevToolsAgent.h
@@ -37,7 +37,6 @@
 namespace blink {
 class WebDevToolsAgentClient;
 class WebDevToolsMessageTransport;
-class WebFrame;
 class WebString;
 class WebURLRequest;
 class WebURLResponse;
diff --git a/public/web/WebDocument.h b/public/web/WebDocument.h
index cf2e680..d17d428 100644
--- a/public/web/WebDocument.h
+++ b/public/web/WebDocument.h
@@ -35,6 +35,7 @@
 #include "../platform/WebVector.h"
 #include "WebDraggableRegion.h"
 #include "WebExceptionCode.h"
+#include "WebFrame.h"
 #include "WebNode.h"
 #include "WebSecurityOrigin.h"
 
@@ -56,7 +57,6 @@
 class WebDocumentType;
 class WebElement;
 class WebFormElement;
-class WebFrame;
 class WebElementCollection;
 class WebNodeList;
 class WebString;
@@ -87,7 +87,7 @@
     BLINK_EXPORT WebURL openSearchDescriptionURL() const;
 
     // Returns the frame the document belongs to or 0 if the document is frameless.
-    BLINK_EXPORT WebFrame* frame() const;
+    BLINK_EXPORT WebLocalFrame* frame() const;
     BLINK_EXPORT bool isHTMLDocument() const;
     BLINK_EXPORT bool isXHTMLDocument() const;
     BLINK_EXPORT bool isPluginDocument() const;
diff --git a/public/web/WebFormControlElement.h b/public/web/WebFormControlElement.h
index bb5733d..31f47dc 100644
--- a/public/web/WebFormControlElement.h
+++ b/public/web/WebFormControlElement.h
@@ -59,6 +59,7 @@
     BLINK_EXPORT WebString formControlName() const;
     BLINK_EXPORT WebString formControlType() const;
 
+    // FIXME: remove this method when no longer used.
     BLINK_EXPORT void dispatchFormControlChangeEvent();
 
     BLINK_EXPORT bool isAutofilled() const;
@@ -70,7 +71,7 @@
     // Sets value for input element, textarea element and select element. For select
     // element it finds the option with value matches the given parameter and make the
     // option as the current selection.
-    BLINK_EXPORT void setValue(const WebString&, bool sendChangeEvent = false);
+    BLINK_EXPORT void setValue(const WebString&, bool sendEvents = false);
     // Returns value of element. For select element, it returns the value of
     // the selected option if present. If no selected option, an empty string
     // is returned. If element doesn't fall into input element, textarea element
diff --git a/public/web/WebFrame.h b/public/web/WebFrame.h
index 1ff4e9d..9155e084 100644
--- a/public/web/WebFrame.h
+++ b/public/web/WebFrame.h
@@ -31,6 +31,7 @@
 #ifndef WebFrame_h
 #define WebFrame_h
 
+#include "WebCompositionUnderline.h"
 #include "WebIconURL.h"
 #include "WebNode.h"
 #include "WebURLLoaderOptions.h"
@@ -85,6 +86,8 @@
 
 template <typename T> class WebVector;
 
+typedef class WebFrame WebLocalFrame;
+
 class WebFrame {
 public:
     // Control of renderTreeAsText output
@@ -97,7 +100,7 @@
 
     // Creates a WebFrame. Delete this WebFrame by calling WebFrame::close().
     // It is valid to pass a null client pointer.
-    BLINK_EXPORT static WebFrame* create(WebFrameClient*);
+    BLINK_EXPORT static WebLocalFrame* create(WebFrameClient*);
 
     // Returns the number of live WebFrame objects, used for leak checking.
     BLINK_EXPORT static int instanceCount();
@@ -105,16 +108,18 @@
     // Returns the WebFrame associated with the current V8 context. This
     // function can return 0 if the context is associated with a Document that
     // is not currently being displayed in a Frame.
-    BLINK_EXPORT static WebFrame* frameForCurrentContext();
+    BLINK_EXPORT static WebLocalFrame* frameForCurrentContext();
 
     // Returns the frame corresponding to the given context. This can return 0
     // if the context is detached from the frame, or if the context doesn't
     // correspond to a frame (e.g., workers).
-    BLINK_EXPORT static WebFrame* frameForContext(v8::Handle<v8::Context>);
+    BLINK_EXPORT static WebLocalFrame* frameForContext(v8::Handle<v8::Context>);
 
     // Returns the frame inside a given frame or iframe element. Returns 0 if
     // the given element is not a frame, iframe or if the frame is empty.
-    BLINK_EXPORT static WebFrame* fromFrameOwnerElement(const WebElement&);
+    BLINK_EXPORT static WebLocalFrame* fromFrameOwnerElement(const WebElement&);
+
+    virtual WebLocalFrame* toWebLocalFrame() = 0;
 
     // This method closes and deletes the WebFrame.
     virtual void close() = 0;
@@ -236,6 +241,13 @@
     virtual WebPerformance performance() const = 0;
 
 
+    // Closing -------------------------------------------------------------
+
+    // Runs beforeunload handlers for this frame, returning false if a
+    // handler suppressed unloading.
+    virtual bool dispatchBeforeUnloadEvent() = 0;
+
+
     // Scripting ----------------------------------------------------------
 
     // Returns a NPObject corresponding to this frame's DOMWindow.
@@ -462,6 +474,10 @@
     virtual void moveRangeSelection(const WebPoint& base, const WebPoint& extent) = 0;
     virtual void moveCaretSelection(const WebPoint&) = 0;
 
+    virtual bool setEditableSelectionOffsets(int start, int end) = 0;
+    virtual bool setCompositionFromExistingText(int compositionStart, int compositionEnd, const WebVector<WebCompositionUnderline>& underlines) = 0;
+    virtual void extendSelectionAndDelete(int before, int after) = 0;
+
     virtual void setCaretVisible(bool) = 0;
 
     // Printing ------------------------------------------------------------
diff --git a/public/web/WebFrameClient.h b/public/web/WebFrameClient.h
index 1b375b0..77948f1 100644
--- a/public/web/WebFrameClient.h
+++ b/public/web/WebFrameClient.h
@@ -33,6 +33,7 @@
 
 #include "WebDOMMessageEvent.h"
 #include "WebDataSource.h"
+#include "WebFrame.h"
 #include "WebIconURL.h"
 #include "WebNavigationPolicy.h"
 #include "WebNavigationType.h"
@@ -52,11 +53,11 @@
 class WebApplicationCacheHost;
 class WebApplicationCacheHostClient;
 class WebCachedURLRequest;
+class WebContentDecryptionModule;
 class WebCookieJar;
 class WebDataSource;
 class WebDOMEvent;
 class WebFormElement;
-class WebFrame;
 class WebInputEvent;
 class WebMediaPlayer;
 class WebMediaPlayerClient;
@@ -84,28 +85,31 @@
     // Factory methods -----------------------------------------------------
 
     // May return null.
-    virtual WebPlugin* createPlugin(WebFrame*, const WebPluginParams&) { return 0; }
+    virtual WebPlugin* createPlugin(WebLocalFrame*, const WebPluginParams&) { return 0; }
 
     // May return null.
-    virtual WebMediaPlayer* createMediaPlayer(WebFrame*, const WebURL&, WebMediaPlayerClient*) { return 0; }
+    virtual WebMediaPlayer* createMediaPlayer(WebLocalFrame*, const WebURL&, WebMediaPlayerClient*) { return 0; }
 
     // May return null.
-    virtual WebApplicationCacheHost* createApplicationCacheHost(WebFrame*, WebApplicationCacheHostClient*) { return 0; }
+    virtual WebContentDecryptionModule* createContentDecryptionModule(WebLocalFrame*, const WebSecurityOrigin&, const WebString& keySystem) { return 0; }
+
+    // May return null.
+    virtual WebApplicationCacheHost* createApplicationCacheHost(WebLocalFrame*, WebApplicationCacheHostClient*) { return 0; }
 
     // May return null. Takes ownership of the client.
     // FIXME: Deprecate the second argument.
-    virtual WebServiceWorkerProvider* createServiceWorkerProvider(WebFrame*, WebServiceWorkerProviderClient*) { return 0; }
-    virtual WebServiceWorkerProvider* createServiceWorkerProvider(WebFrame* frame) { return createServiceWorkerProvider(frame, 0); }
+    virtual WebServiceWorkerProvider* createServiceWorkerProvider(WebLocalFrame*, WebServiceWorkerProviderClient*) { return 0; }
+    virtual WebServiceWorkerProvider* createServiceWorkerProvider(WebLocalFrame* frame) { return createServiceWorkerProvider(frame, 0); }
 
     // May return null.
-    virtual WebWorkerPermissionClientProxy* createWorkerPermissionClientProxy(WebFrame*) { return 0; }
+    virtual WebWorkerPermissionClientProxy* createWorkerPermissionClientProxy(WebLocalFrame*) { return 0; }
 
 
     // Services ------------------------------------------------------------
 
     // A frame specific cookie jar.  May return null, in which case
     // WebKitPlatformSupport::cookieJar() will be called to access cookies.
-    virtual WebCookieJar* cookieJar(WebFrame*) { return 0; }
+    virtual WebCookieJar* cookieJar(WebLocalFrame*) { return 0; }
 
 
     // General notifications -----------------------------------------------
@@ -113,7 +117,7 @@
     // Indicates that another page has accessed the DOM of the initial empty
     // document of a main frame. After this, it is no longer safe to show a
     // pending navigation's URL, because a URL spoof is possible.
-    virtual void didAccessInitialDocument(WebFrame*) { }
+    virtual void didAccessInitialDocument(WebLocalFrame*) { }
 
     // A child frame was created in this frame. This is called when the frame
     // is created and initialized. Takes the name of the new frame, the parent
@@ -121,11 +125,11 @@
     // until frameDetached() is called on it.
     // Note: If you override this, you should almost certainly be overriding
     // frameDetached().
-    virtual WebFrame* createChildFrame(WebFrame* parent, const WebString& frameName) { return 0; }
+    virtual WebFrame* createChildFrame(WebLocalFrame* parent, const WebString& frameName) { return 0; }
 
     // This frame set its opener to null, disowning it.
     // See http://html.spec.whatwg.org/#dom-opener.
-    virtual void didDisownOpener(WebFrame*) { }
+    virtual void didDisownOpener(WebLocalFrame*) { }
 
     // This frame has been detached from the view, but has not been closed yet.
     virtual void frameDetached(WebFrame*) { }
@@ -135,21 +139,21 @@
 
     // This frame is about to be closed. This is called after frameDetached,
     // when the document is being unloaded, due to new one committing.
-    virtual void willClose(WebFrame*) { }
+    virtual void willClose(WebLocalFrame*) { }
 
     // This frame's name has changed.
-    virtual void didChangeName(WebFrame*, const WebString&) { }
+    virtual void didChangeName(WebLocalFrame*, const WebString&) { }
 
     // Called when a watched CSS selector matches or stops matching.
-    virtual void didMatchCSS(WebFrame*, const WebVector<WebString>& newlyMatchingSelectors, const WebVector<WebString>& stoppedMatchingSelectors) { }
+    virtual void didMatchCSS(WebLocalFrame*, const WebVector<WebString>& newlyMatchingSelectors, const WebVector<WebString>& stoppedMatchingSelectors) { }
 
     // Load commands -------------------------------------------------------
 
     // The client should handle the navigation externally.
     virtual void loadURLExternally(
-        WebFrame*, const WebURLRequest&, WebNavigationPolicy) { }
+        WebLocalFrame*, const WebURLRequest&, WebNavigationPolicy) { }
     virtual void loadURLExternally(
-        WebFrame*, const WebURLRequest&, WebNavigationPolicy, const WebString& downloadName) { }
+        WebLocalFrame*, const WebURLRequest&, WebNavigationPolicy, const WebString& downloadName) { }
 
 
     // Navigational queries ------------------------------------------------
@@ -157,72 +161,81 @@
     // The client may choose to alter the navigation policy.  Otherwise,
     // defaultPolicy should just be returned.
     virtual WebNavigationPolicy decidePolicyForNavigation(
-        WebFrame*, WebDataSource::ExtraData*, const WebURLRequest&, WebNavigationType,
+        WebLocalFrame*, WebDataSource::ExtraData*, const WebURLRequest&, WebNavigationType,
         WebNavigationPolicy defaultPolicy, bool isRedirect) { return defaultPolicy; }
 
 
     // Navigational notifications ------------------------------------------
 
+    // These notifications bracket any loading that occurs in the WebFrame.
+    virtual void didStartLoading(bool toDifferentDocument) { }
+    virtual void didStopLoading() { }
+
+    // Notification that some progress was made loading the current frame.
+    // loadProgress is a value between 0 (nothing loaded) and 1.0 (frame fully
+    // loaded).
+    virtual void didChangeLoadProgress(double loadProgress) { }
+
     // A form submission has been requested, but the page's submit event handler
     // hasn't yet had a chance to run (and possibly alter/interrupt the submit.)
-    virtual void willSendSubmitEvent(WebFrame*, const WebFormElement&) { }
+    virtual void willSendSubmitEvent(WebLocalFrame*, const WebFormElement&) { }
 
     // A form submission is about to occur.
-    virtual void willSubmitForm(WebFrame*, const WebFormElement&) { }
+    virtual void willSubmitForm(WebLocalFrame*, const WebFormElement&) { }
 
     // A datasource has been created for a new navigation.  The given
     // datasource will become the provisional datasource for the frame.
-    virtual void didCreateDataSource(WebFrame*, WebDataSource*) { }
+    virtual void didCreateDataSource(WebLocalFrame*, WebDataSource*) { }
 
     // A new provisional load has been started.
-    virtual void didStartProvisionalLoad(WebFrame*) { }
+    virtual void didStartProvisionalLoad(WebLocalFrame*) { }
 
     // The provisional load was redirected via a HTTP 3xx response.
-    virtual void didReceiveServerRedirectForProvisionalLoad(WebFrame*) { }
+    virtual void didReceiveServerRedirectForProvisionalLoad(WebLocalFrame*) { }
 
     // The provisional load failed.
-    virtual void didFailProvisionalLoad(WebFrame*, const WebURLError&) { }
+    virtual void didFailProvisionalLoad(WebLocalFrame*, const WebURLError&) { }
 
     // The provisional datasource is now committed.  The first part of the
     // response body has been received, and the encoding of the response
     // body is known.
-    virtual void didCommitProvisionalLoad(WebFrame*, bool isNewNavigation) { }
+    virtual void didCommitProvisionalLoad(WebLocalFrame*, bool isNewNavigation) { }
 
     // The window object for the frame has been cleared of any extra
     // properties that may have been set by script from the previously
     // loaded document.
-    virtual void didClearWindowObject(WebFrame* frame, int worldId) { }
+    virtual void didClearWindowObject(WebLocalFrame* frame, int worldId) { }
 
     // The document element has been created.
-    virtual void didCreateDocumentElement(WebFrame*) { }
+    virtual void didCreateDocumentElement(WebLocalFrame*) { }
 
     // The page title is available.
-    virtual void didReceiveTitle(WebFrame* frame, const WebString& title, WebTextDirection direction) { }
+    virtual void didReceiveTitle(WebLocalFrame* frame, const WebString& title, WebTextDirection direction) { }
 
     // The icon for the page have changed.
-    virtual void didChangeIcon(WebFrame*, WebIconURL::Type) { }
+    virtual void didChangeIcon(WebLocalFrame*, WebIconURL::Type) { }
 
     // The frame's document finished loading.
-    virtual void didFinishDocumentLoad(WebFrame*) { }
+    virtual void didFinishDocumentLoad(WebLocalFrame*) { }
 
     // The 'load' event was dispatched.
-    virtual void didHandleOnloadEvents(WebFrame*) { }
+    virtual void didHandleOnloadEvents(WebLocalFrame*) { }
 
     // The frame's document or one of its subresources failed to load.
-    virtual void didFailLoad(WebFrame*, const WebURLError&) { }
+    virtual void didFailLoad(WebLocalFrame*, const WebURLError&) { }
 
     // The frame's document and all of its subresources succeeded to load.
-    virtual void didFinishLoad(WebFrame*) { }
+    virtual void didFinishLoad(WebLocalFrame*) { }
 
     // The navigation resulted in no change to the documents within the page.
     // For example, the navigation may have just resulted in scrolling to a
     // named anchor or a PopState event may have been dispatched.
-    virtual void didNavigateWithinPage(WebFrame*, bool isNewNavigation) { }
+    virtual void didNavigateWithinPage(WebLocalFrame*, bool isNewNavigation) { }
 
     // Called upon update to scroll position, document state, and other
     // non-navigational events related to the data held by WebHistoryItem.
     // WARNING: This method may be called very frequently.
-    virtual void didUpdateCurrentHistoryItem(WebFrame*) { }
+    virtual void didUpdateCurrentHistoryItem(WebLocalFrame*) { }
 
     // Editing -------------------------------------------------------------
 
@@ -245,77 +258,80 @@
     // Low-level resource notifications ------------------------------------
 
     // An element will request a resource.
-    virtual void willRequestResource(WebFrame*, const WebCachedURLRequest&) { }
+    virtual void willRequestResource(WebLocalFrame*, const WebCachedURLRequest&) { }
 
     // The request is after preconnect is triggered.
-    virtual void willRequestAfterPreconnect(WebFrame*, WebURLRequest&) { }
+    virtual void willRequestAfterPreconnect(WebLocalFrame*, WebURLRequest&) { }
 
     // A request is about to be sent out, and the client may modify it.  Request
     // is writable, and changes to the URL, for example, will change the request
     // made.  If this request is the result of a redirect, then redirectResponse
     // will be non-null and contain the response that triggered the redirect.
     virtual void willSendRequest(
-        WebFrame*, unsigned identifier, WebURLRequest&,
+        WebLocalFrame*, unsigned identifier, WebURLRequest&,
         const WebURLResponse& redirectResponse) { }
 
     // Response headers have been received for the resource request given
     // by identifier.
     virtual void didReceiveResponse(
-        WebFrame*, unsigned identifier, const WebURLResponse&) { }
+        WebLocalFrame*, unsigned identifier, const WebURLResponse&) { }
 
     virtual void didChangeResourcePriority(
-        WebFrame*, unsigned identifier, const blink::WebURLRequest::Priority&) { }
+        WebLocalFrame*, unsigned identifier, const blink::WebURLRequest::Priority&) { }
+
+    virtual void didChangeResourcePriority(
+        WebFrame* webFrame, unsigned identifier, const blink::WebURLRequest::Priority& priority, int) { didChangeResourcePriority(webFrame, identifier, priority); }
 
     // The resource request given by identifier succeeded.
     virtual void didFinishResourceLoad(
-        WebFrame*, unsigned identifier) { }
+        WebLocalFrame*, unsigned identifier) { }
 
     // The specified request was satified from WebCore's memory cache.
     virtual void didLoadResourceFromMemoryCache(
-        WebFrame*, const WebURLRequest&, const WebURLResponse&) { }
+        WebLocalFrame*, const WebURLRequest&, const WebURLResponse&) { }
 
     // This frame has displayed inactive content (such as an image) from an
     // insecure source.  Inactive content cannot spread to other frames.
-    virtual void didDisplayInsecureContent(WebFrame*) { }
+    virtual void didDisplayInsecureContent(WebLocalFrame*) { }
 
     // The indicated security origin has run active content (such as a
     // script) from an insecure source.  Note that the insecure content can
     // spread to other frames in the same origin.
-    virtual void didRunInsecureContent(WebFrame*, const WebSecurityOrigin&, const WebURL& insecureURL) { }
+    virtual void didRunInsecureContent(WebLocalFrame*, const WebSecurityOrigin&, const WebURL& insecureURL) { }
 
     // A reflected XSS was encountered in the page and suppressed.
-    virtual void didDetectXSS(WebFrame*, const WebURL&, bool didBlockEntirePage) { }
+    virtual void didDetectXSS(WebLocalFrame*, const WebURL&, bool didBlockEntirePage) { }
 
     // A PingLoader was created, and a request dispatched to a URL.
-    virtual void didDispatchPingLoader(WebFrame*, const WebURL&) { }
+    virtual void didDispatchPingLoader(WebLocalFrame*, const WebURL&) { }
 
     // The loaders in this frame have been stopped.
-    virtual void didAbortLoading(WebFrame*) { }
+    virtual void didAbortLoading(WebLocalFrame*) { }
 
     // Script notifications ------------------------------------------------
 
     // Notifies that a new script context has been created for this frame.
     // This is similar to didClearWindowObject but only called once per
     // frame context.
-    virtual void didCreateScriptContext(WebFrame*, v8::Handle<v8::Context>, int extensionGroup, int worldId) { }
+    virtual void didCreateScriptContext(WebLocalFrame*, v8::Handle<v8::Context>, int extensionGroup, int worldId) { }
 
     // WebKit is about to release its reference to a v8 context for a frame.
-    virtual void willReleaseScriptContext(WebFrame*, v8::Handle<v8::Context>, int worldId) { }
+    virtual void willReleaseScriptContext(WebLocalFrame*, v8::Handle<v8::Context>, int worldId) { }
 
     // Geometry notifications ----------------------------------------------
 
     // The frame's document finished the initial non-empty layout of a page.
-    virtual void didFirstVisuallyNonEmptyLayout(WebFrame*) { }
+    virtual void didFirstVisuallyNonEmptyLayout(WebLocalFrame*) { }
 
     // The size of the content area changed.
-    virtual void didChangeContentsSize(WebFrame*, const WebSize&) { }
+    virtual void didChangeContentsSize(WebLocalFrame*, const WebSize&) { }
 
     // The main frame scrolled.
-    virtual void didChangeScrollOffset(WebFrame*) { }
+    virtual void didChangeScrollOffset(WebLocalFrame*) { }
 
     // If the frame is loading an HTML document, this will be called to
     // notify that the <body> will be attached soon.
-    virtual void willInsertBody(WebFrame*) { }
+    virtual void willInsertBody(WebLocalFrame*) { }
 
     // Find-in-page notifications ------------------------------------------
 
@@ -345,7 +361,7 @@
     // Note that the requesting quota size may not always be granted and
     // a smaller amount of quota than requested might be returned.
     virtual void requestStorageQuota(
-        WebFrame*, WebStorageQuotaType,
+        WebLocalFrame*, WebStorageQuotaType,
         unsigned long long newQuotaInBytes,
         WebStorageQuotaCallbacks) { }
 
@@ -357,7 +373,7 @@
     // MediaStream -----------------------------------------------------
 
     // A new WebRTCPeerConnectionHandler is created.
-    virtual void willStartUsingPeerConnectionHandler(WebFrame*, WebRTCPeerConnectionHandler*) { }
+    virtual void willStartUsingPeerConnectionHandler(WebLocalFrame*, WebRTCPeerConnectionHandler*) { }
 
     // Messages ------------------------------------------------------
 
@@ -365,7 +381,7 @@
     // gives the embedder a chance to handle it instead of WebKit. Returns true
     // if the embedder handled it.
     virtual bool willCheckAndDispatchMessageEvent(
-        WebFrame* sourceFrame,
+        WebLocalFrame* sourceFrame,
         WebFrame* targetFrame,
         WebSecurityOrigin target,
         WebDOMMessageEvent event) { return false; }
@@ -373,11 +389,11 @@
     // Asks the embedder if a specific user agent should be used for the given
     // URL. Non-empty strings indicate an override should be used. Otherwise,
     // Platform::current()->userAgent() will be called to provide one.
-    virtual WebString userAgentOverride(WebFrame*, const WebURL& url) { return WebString(); }
+    virtual WebString userAgentOverride(WebLocalFrame*, const WebURL& url) { return WebString(); }
 
     // Asks the embedder what value the network stack will send for the DNT
     // header. An empty string indicates that no DNT header will be send.
-    virtual WebString doNotTrackValue(WebFrame*) { return WebString(); }
+    virtual WebString doNotTrackValue(WebLocalFrame*) { return WebString(); }
 
     // WebGL ------------------------------------------------------
 
@@ -385,12 +401,12 @@
     // This call is placed here instead of WebPermissionClient because this
     // class is implemented in content/, and putting it here avoids adding
     // more public content/ APIs.
-    virtual bool allowWebGL(WebFrame*, bool defaultValue) { return defaultValue; }
+    virtual bool allowWebGL(WebLocalFrame*, bool defaultValue) { return defaultValue; }
 
     // Notifies the client that a WebGL context was lost on this page with the
     // given reason (one of the GL_ARB_robustness status codes; see
     // Extensions3D.h in WebCore/platform/graphics).
-    virtual void didLoseWebGLContext(WebFrame*, int) { }
+    virtual void didLoseWebGLContext(WebLocalFrame*, int) { }
 
     // FIXME: Remove this method once we have input routing in the browser
     // process. See http://crbug.com/339659.
diff --git a/public/web/WebHelperPlugin.h b/public/web/WebHelperPlugin.h
index 084bf15..57ec1fd 100644
--- a/public/web/WebHelperPlugin.h
+++ b/public/web/WebHelperPlugin.h
@@ -32,10 +32,10 @@
 #define WebHelperPlugin_h
 
 #include "../platform/WebCommon.h"
+#include "WebFrame.h"
 
 namespace blink {
 
-class WebFrame;
 class WebPlugin;
 class WebString;
 
@@ -43,7 +43,7 @@
 public:
     // May return null if initialization fails. If the returned pointer is
     // non-null, the caller must free it by calling destroy().
-    BLINK_EXPORT static WebHelperPlugin* create(const WebString& PluginType, WebFrame*);
+    BLINK_EXPORT static WebHelperPlugin* create(const WebString& PluginType, WebLocalFrame*);
 
     // Returns a WebPlugin corresponding to the instantiated plugin. This will
     // never return null.
diff --git a/public/web/WebInputElement.h b/public/web/WebInputElement.h
index e425093..e9965cf 100644
--- a/public/web/WebInputElement.h
+++ b/public/web/WebInputElement.h
@@ -73,7 +73,7 @@
         BLINK_EXPORT bool isActivatedSubmit() const;
         BLINK_EXPORT void setActivatedSubmit(bool);
         BLINK_EXPORT int size() const;
-        BLINK_EXPORT void setChecked(bool, bool sendChangeEvent = false);
+        BLINK_EXPORT void setChecked(bool, bool sendEvents = false);
         // Sets the value inside the text field without being sanitized.
         // Can't be used if a renderer doesn't exist or on a non text field type.
         // Caret will be moved to the end.
diff --git a/public/web/WebInputEvent.h b/public/web/WebInputEvent.h
index f9fc765..3a56fae 100644
--- a/public/web/WebInputEvent.h
+++ b/public/web/WebInputEvent.h
@@ -361,6 +361,24 @@
     Phase phase;
     Phase momentumPhase;
 
+    // See comment at the top of the file for why an int is used here.
+    // Rubberbanding is an OSX visual effect. When a user scrolls the content
+    // area with a track pad, and the content area is already at its limit in
+    // the direction being scrolled, the entire content area is allowed to
+    // scroll slightly off screen, revealing a grey background. When the user
+    // lets go, the content area snaps back into place. Blink is responsible
+    // for this rubberbanding effect, but the embedder may wish to disable
+    // rubber banding in the left or right direction, if the scroll should have
+    // an alternate effect. The common case is that a scroll in the left or
+    // right directions causes a back or forwards navigation, respectively.
+    //
+    // These flags prevent rubber banding from starting in a given direction,
+    // but have no effect on an ongoing rubber banding. A rubber banding that
+    // started in the vertical direction is allowed to continue in the right
+    // direction, even if canRubberbandRight is 0.
+    int canRubberbandLeft;
+    int canRubberbandRight;
+
     WebMouseWheelEvent(unsigned sizeParam = sizeof(WebMouseWheelEvent))
         : WebMouseEvent(sizeParam)
         , deltaX(0.0f)
@@ -373,6 +391,8 @@
         , hasPreciseScrollingDeltas(false)
         , phase(PhaseNone)
         , momentumPhase(PhaseNone)
+        , canRubberbandLeft(true)
+        , canRubberbandRight(true)
     {
     }
 };
diff --git a/public/web/WebLeakDetector.h b/public/web/WebLeakDetector.h
index 652fd3b..35990af 100644
--- a/public/web/WebLeakDetector.h
+++ b/public/web/WebLeakDetector.h
@@ -31,16 +31,15 @@
 #ifndef WebLeakDetector_h
 #define WebLeakDetector_h
 
+#include "WebFrame.h"
 #include "public/platform/WebCommon.h"
 
 namespace blink {
 
-class WebFrame;
-
 class WebLeakDetector {
 public:
     // Cleans up the DOM objects and counts them. This is supposed to be used for detecting DOM-object leaks.
-    BLINK_EXPORT static void collectGarbargeAndGetDOMCounts(WebFrame*, unsigned* numberOfLiveDocuments, unsigned* numberOfLiveNodes);
+    BLINK_EXPORT static void collectGarbargeAndGetDOMCounts(WebLocalFrame*, unsigned* numberOfLiveDocuments, unsigned* numberOfLiveNodes);
 };
 
 } // namespace blink
diff --git a/public/web/WebLocalFrame.h b/public/web/WebLocalFrame.h
new file mode 100644
index 0000000..9197a46
--- /dev/null
+++ b/public/web/WebLocalFrame.h
@@ -0,0 +1,12 @@
+// Copyright 2014 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 WebLocalFrame_h
+#define WebLocalFrame_h
+
+// FIXME: There is currently just a forwarding header until Chrome is updated to
+// use these types.
+#include "WebFrame.h"
+
+#endif // WebLocalFrame_h
diff --git a/public/web/WebMIDIClient.h b/public/web/WebMIDIClient.h
index 9435b93..86f39c1 100644
--- a/public/web/WebMIDIClient.h
+++ b/public/web/WebMIDIClient.h
@@ -39,9 +39,9 @@
     virtual ~WebMIDIClient() { }
 
     // Request a permission to use system exclusive messages. Called when MIDIOptions.sysex is true.
-    virtual void requestSysExPermission(const WebMIDIPermissionRequest&) = 0;
+    virtual void requestSysexPermission(const WebMIDIPermissionRequest&) = 0;
     // Cancel the request since the requesting frame may be moving to a new page.
-    virtual void cancelSysExPermissionRequest(const WebMIDIPermissionRequest&) = 0;
+    virtual void cancelSysexPermissionRequest(const WebMIDIPermissionRequest&) = 0;
 };
 
 } // namespace blink
diff --git a/public/web/WebMIDIClientMock.h b/public/web/WebMIDIClientMock.h
index 95ba401..0ed5833 100644
--- a/public/web/WebMIDIClientMock.h
+++ b/public/web/WebMIDIClientMock.h
@@ -46,12 +46,12 @@
     BLINK_EXPORT WebMIDIClientMock();
     virtual ~WebMIDIClientMock() { reset(); }
 
-    BLINK_EXPORT void setSysExPermission(bool);
+    BLINK_EXPORT void setSysexPermission(bool);
     BLINK_EXPORT void resetMock();
 
     // WebMIDIClient
-    virtual void requestSysExPermission(const WebMIDIPermissionRequest&) OVERRIDE;
-    virtual void cancelSysExPermissionRequest(const WebMIDIPermissionRequest&) OVERRIDE;
+    virtual void requestSysexPermission(const WebMIDIPermissionRequest&) OVERRIDE;
+    virtual void cancelSysexPermissionRequest(const WebMIDIPermissionRequest&) OVERRIDE;
 
 private:
     BLINK_EXPORT void reset();
diff --git a/public/web/WebNode.h b/public/web/WebNode.h
index d82594c..edd088f 100644
--- a/public/web/WebNode.h
+++ b/public/web/WebNode.h
@@ -45,7 +45,6 @@
 class WebDocument;
 class WebElement;
 class WebElementCollection;
-class WebFrame;
 class WebNodeList;
 class WebPluginContainer;
 
diff --git a/public/web/WebPageSerializer.h b/public/web/WebPageSerializer.h
index 89a3a31..b018a11 100644
--- a/public/web/WebPageSerializer.h
+++ b/public/web/WebPageSerializer.h
@@ -34,9 +34,9 @@
 #include "../platform/WebCString.h"
 #include "../platform/WebCommon.h"
 #include "../platform/WebURL.h"
+#include "WebFrame.h"
 
 namespace blink {
-class WebFrame;
 class WebPageSerializerClient;
 class WebString;
 class WebView;
@@ -88,12 +88,13 @@
     // saved links, which matched with vector:links one by one.
     // The parameter localDirectoryName is relative path of directory which
     // contain all saved auxiliary files included all sub frames and resources.
-    BLINK_EXPORT static bool serialize(WebFrame*,
-                                        bool recursive,
-                                        WebPageSerializerClient*,
-                                        const WebVector<WebURL>& links,
-                                        const WebVector<WebString>& localPaths,
-                                        const WebString& localDirectoryName);
+    BLINK_EXPORT static bool serialize(
+        WebLocalFrame*,
+        bool recursive,
+        WebPageSerializerClient*,
+        const WebVector<WebURL>& links,
+        const WebVector<WebString>& localPaths,
+        const WebString& localDirectoryName);
 
     // Retrieve all the resource for the passed view, including the main frame
     // and sub-frames. Returns true if all resources were retrieved
diff --git a/public/web/WebPermissionClient.h b/public/web/WebPermissionClient.h
index 3eea898..fbb6d9e 100644
--- a/public/web/WebPermissionClient.h
+++ b/public/web/WebPermissionClient.h
@@ -31,10 +31,11 @@
 #ifndef WebPermissionClient_h
 #define WebPermissionClient_h
 
+#include "WebFrame.h"
+
 namespace blink {
 
 class WebDocument;
-class WebFrame;
 class WebPermissionCallbacks;
 class WebSecurityOrigin;
 class WebString;
@@ -43,72 +44,72 @@
 class WebPermissionClient {
 public:
     // Controls whether access to Web Databases is allowed for this frame.
-    virtual bool allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize) { return true; }
+    virtual bool allowDatabase(WebLocalFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize) { return true; }
 
     // Controls whether access to File System is allowed for this frame.
-    virtual bool allowFileSystem(WebFrame*) { return true; }
+    virtual bool allowFileSystem(WebLocalFrame*) { return true; }
 
     virtual void requestFileSystemAccess(WebFrame* frame, const WebPermissionCallbacks& callbacks) { }
 
     // Controls whether images are allowed for this frame.
-    virtual bool allowImage(WebFrame* frame, bool enabledPerSettings, const WebURL& imageURL) { return enabledPerSettings; }
+    virtual bool allowImage(WebLocalFrame* frame, bool enabledPerSettings, const WebURL& imageURL) { return enabledPerSettings; }
 
     // Controls whether access to Indexed DB are allowed for this frame.
-    virtual bool allowIndexedDB(WebFrame*, const WebString& name, const WebSecurityOrigin&) { return true; }
+    virtual bool allowIndexedDB(WebLocalFrame*, const WebString& name, const WebSecurityOrigin&) { return true; }
 
     // Controls whether plugins are allowed for this frame.
-    virtual bool allowPlugins(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; }
+    virtual bool allowPlugins(WebLocalFrame*, bool enabledPerSettings) { return enabledPerSettings; }
 
     // Controls whether scripts are allowed to execute for this frame.
-    virtual bool allowScript(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; }
+    virtual bool allowScript(WebLocalFrame*, bool enabledPerSettings) { return enabledPerSettings; }
 
     // Controls whether scripts loaded from the given URL are allowed to execute for this frame.
-    virtual bool allowScriptFromSource(WebFrame*, bool enabledPerSettings, const WebURL& scriptURL) { return enabledPerSettings; }
+    virtual bool allowScriptFromSource(WebLocalFrame*, bool enabledPerSettings, const WebURL& scriptURL) { return enabledPerSettings; }
 
     // Controls whether insecrure content is allowed to display for this frame.
-    virtual bool allowDisplayingInsecureContent(WebFrame*, bool enabledPerSettings, const WebSecurityOrigin&, const WebURL&) { return enabledPerSettings; }
+    virtual bool allowDisplayingInsecureContent(WebLocalFrame*, bool enabledPerSettings, const WebSecurityOrigin&, const WebURL&) { return enabledPerSettings; }
 
     // Controls whether insecrure scripts are allowed to execute for this frame.
-    virtual bool allowRunningInsecureContent(WebFrame*, bool enabledPerSettings, const WebSecurityOrigin&, const WebURL&) { return enabledPerSettings; }
+    virtual bool allowRunningInsecureContent(WebLocalFrame*, bool enabledPerSettings, const WebSecurityOrigin&, const WebURL&) { return enabledPerSettings; }
 
     // Controls whether the given script extension should run in a new script
     // context in this frame. If extensionGroup is 0, the script context is the
     // frame's main context. Otherwise, it is a context created by
-    // WebFrame::executeScriptInIsolatedWorld with that same extensionGroup
+    // WebLocalFrame::executeScriptInIsolatedWorld with that same extensionGroup
     // value.
-    virtual bool allowScriptExtension(WebFrame*, const WebString& extensionName, int extensionGroup) { return true; }
+    virtual bool allowScriptExtension(WebLocalFrame*, const WebString& extensionName, int extensionGroup) { return true; }
 
-    virtual bool allowScriptExtension(WebFrame* webFrame, const WebString& extensionName, int extensionGroup, int worldId)
+    virtual bool allowScriptExtension(WebLocalFrame* webFrame, const WebString& extensionName, int extensionGroup, int worldId)
     {
         return allowScriptExtension(webFrame, extensionName, extensionGroup);
     }
 
     // Controls whether HTML5 Web Storage is allowed for this frame.
     // If local is true, then this is for local storage, otherwise it's for session storage.
-    virtual bool allowStorage(WebFrame*, bool local) { return true; }
+    virtual bool allowStorage(WebLocalFrame*, bool local) { return true; }
 
     // Controls whether access to read the clipboard is allowed for this frame.
-    virtual bool allowReadFromClipboard(WebFrame*, bool defaultValue) { return defaultValue; }
+    virtual bool allowReadFromClipboard(WebLocalFrame*, bool defaultValue) { return defaultValue; }
 
     // Controls whether access to write the clipboard is allowed for this frame.
-    virtual bool allowWriteToClipboard(WebFrame*, bool defaultValue) { return defaultValue; }
+    virtual bool allowWriteToClipboard(WebLocalFrame*, bool defaultValue) { return defaultValue; }
 
     // Controls whether enabling Web Components API for this frame.
-    virtual bool allowWebComponents(WebFrame*, bool defaultValue) { return defaultValue; }
+    virtual bool allowWebComponents(WebLocalFrame*, bool defaultValue) { return defaultValue; }
 
     // Controls whether to enable MutationEvents for this frame.
     // The common use case of this method is actually to selectively disable MutationEvents,
     // but it's been named for consistency with the rest of the interface.
-    virtual bool allowMutationEvents(WebFrame*, bool defaultValue) { return defaultValue; }
+    virtual bool allowMutationEvents(WebLocalFrame*, bool defaultValue) { return defaultValue; }
 
     // Controls whether pushState and related History APIs are enabled for this frame.
-    virtual bool allowPushState(WebFrame*) { return true; }
+    virtual bool allowPushState(WebLocalFrame*) { return true; }
 
     // Notifies the client that the frame would have instantiated a plug-in if plug-ins were enabled.
-    virtual void didNotAllowPlugins(WebFrame*) { }
+    virtual void didNotAllowPlugins(WebLocalFrame*) { }
 
     // Notifies the client that the frame would have executed script if script were enabled.
-    virtual void didNotAllowScript(WebFrame*) { }
+    virtual void didNotAllowScript(WebLocalFrame*) { }
 
 protected:
     ~WebPermissionClient() { }
diff --git a/public/web/WebPlugin.h b/public/web/WebPlugin.h
index 9f046f2..d935150 100644
--- a/public/web/WebPlugin.h
+++ b/public/web/WebPlugin.h
@@ -45,7 +45,6 @@
 
 class WebDataSource;
 class WebDragData;
-class WebFrame;
 class WebInputEvent;
 class WebPluginContainer;
 class WebURLResponse;
diff --git a/public/web/WebRange.h b/public/web/WebRange.h
index 3eeeeb0..5d463f8 100644
--- a/public/web/WebRange.h
+++ b/public/web/WebRange.h
@@ -33,6 +33,7 @@
 
 #include "../platform/WebCommon.h"
 #include "../platform/WebVector.h"
+#include "WebFrame.h"
 
 #if BLINK_IMPLEMENTATION
 namespace WebCore { class Range; }
@@ -42,7 +43,6 @@
 namespace blink {
 
 struct WebFloatQuad;
-class WebFrame;
 class WebNode;
 class WebRangePrivate;
 class WebString;
@@ -75,7 +75,7 @@
 
     BLINK_EXPORT WebRange expandedToParagraph() const;
 
-    BLINK_EXPORT static WebRange fromDocumentRange(WebFrame*, int start, int length);
+    BLINK_EXPORT static WebRange fromDocumentRange(WebLocalFrame*, int start, int length);
 
     BLINK_EXPORT WebVector<WebFloatQuad> textQuads() const;
 
diff --git a/public/web/WebRuntimeFeatures.h b/public/web/WebRuntimeFeatures.h
index eac7593..a93eaf3 100644
--- a/public/web/WebRuntimeFeatures.h
+++ b/public/web/WebRuntimeFeatures.h
@@ -36,12 +36,9 @@
 namespace blink {
 
 // This class is used to enable runtime features of Blink.
-// All features are disabled by default.
-// Most clients should call enableStableFeatures() to enable
-// features Blink has made API commitments to.
+// Stable features are enabled by default.
 class WebRuntimeFeatures {
 public:
-    BLINK_EXPORT static void enableStableFeatures(bool);
     BLINK_EXPORT static void enableExperimentalFeatures(bool);
     BLINK_EXPORT static void enableTestOnlyFeatures(bool);
 
@@ -59,8 +56,6 @@
 
     BLINK_EXPORT static void enableBleedingEdgeFastPaths(bool);
 
-    BLINK_EXPORT static void enableDirectWrite(bool);
-
     BLINK_EXPORT static void enableExperimentalCanvasFeatures(bool);
 
     BLINK_EXPORT static void enableFastTextAutosizing(bool);
@@ -132,6 +127,8 @@
 
     BLINK_EXPORT static void enableTargetedStyleRecalc(bool);
 
+    BLINK_EXPORT static void enablePreciseMemoryInfo(bool);
+
 private:
     WebRuntimeFeatures();
 };
diff --git a/public/web/WebSerializedScriptValueVersion.h b/public/web/WebSerializedScriptValueVersion.h
index f00ae5e..4e15eb6 100644
--- a/public/web/WebSerializedScriptValueVersion.h
+++ b/public/web/WebSerializedScriptValueVersion.h
@@ -38,7 +38,7 @@
 // Embedders may serialize this as out-of-band metadata along with
 // collections of serialized data so that version skew can be detected
 // before deserializing individual values.
-const unsigned kSerializedScriptValueVersion = 4;
+const unsigned kSerializedScriptValueVersion = 5;
 
 } // namespace blink
 
diff --git a/public/web/WebServiceWorkerContextClient.h b/public/web/WebServiceWorkerContextClient.h
index 540cb06..dc4ebde 100644
--- a/public/web/WebServiceWorkerContextClient.h
+++ b/public/web/WebServiceWorkerContextClient.h
@@ -32,6 +32,7 @@
 #define WebServiceWorkerContextClient_h
 
 #include "WebWorkerPermissionClientProxy.h"
+#include "public/platform/WebServiceWorkerEventResult.h"
 
 namespace blink {
 
@@ -77,10 +78,17 @@
     virtual void dispatchDevToolsMessage(const WebString&) { }
     virtual void saveDevToolsAgentState(const WebString&) { }
 
+    // ServiceWorker specific method.
+    virtual void didHandleActivateEvent(int eventID, blink::WebServiceWorkerEventResult result) { }
+
     // ServiceWorker specific method. Called after InstallEvent (dispatched
     // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's
     // script context.
     virtual void didHandleInstallEvent(int installEventID) { }
+    virtual void didHandleInstallEvent(int installEventID, blink::WebServiceWorkerEventResult result)
+    {
+        didHandleInstallEvent(installEventID);
+    }
 
     // ServiceWorker specific methods. Called after FetchEvent is handled by the
     // ServiceWorker's script context. When no response is provided, the browser
@@ -90,6 +98,11 @@
 
     // Ownership of the returned object is transferred to the caller.
     virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider(blink::WebDataSource*) { return 0; }
+
+    // ServiceWorker specific method. Called after SyncEvent (dispatched via
+    // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script
+    // context.
+    virtual void didHandleSyncEvent(int syncEventID) { }
 };
 
 } // namespace blink
diff --git a/public/web/WebServiceWorkerContextProxy.h b/public/web/WebServiceWorkerContextProxy.h
index 07278c0..7118f3c 100644
--- a/public/web/WebServiceWorkerContextProxy.h
+++ b/public/web/WebServiceWorkerContextProxy.h
@@ -31,6 +31,8 @@
 #ifndef WebServiceWorkerContextProxy_h
 #define WebServiceWorkerContextProxy_h
 
+#include "public/platform/WebMessagePortChannel.h"
+
 namespace blink {
 
 class WebString;
@@ -41,11 +43,18 @@
 public:
     virtual ~WebServiceWorkerContextProxy() { }
 
+    virtual void dispatchActivateEvent(int eventID) = 0;
     // FIXME: This needs to pass the active service worker info.
     virtual void dispatchInstallEvent(int installEventID) = 0;
     // FIXME: This needs to pass the fetch request info.
     virtual void dispatchFetchEvent(int fetchEventID) = 0;
 
+    virtual void dispatchMessageEvent(const WebString& message, const WebMessagePortChannelArray& channels) = 0;
+
+    // Once the ServiceWorker has finished handling the sync event
+    // didHandleSyncEvent is called on the context client.
+    virtual void dispatchSyncEvent(int syncEventID) = 0;
+
     virtual void resumeWorkerContext() { }
     virtual void attachDevTools() { }
     virtual void reattachDevTools(const WebString& savedState) { }
diff --git a/public/web/WebSettings.h b/public/web/WebSettings.h
index 8c66ea4..a43a9ce 100644
--- a/public/web/WebSettings.h
+++ b/public/web/WebSettings.h
@@ -69,11 +69,11 @@
     virtual void setAcceleratedCompositingForGpuRasterizationHintEnabled(bool) = 0;
     virtual void setAcceleratedCompositingForOverflowScrollEnabled(bool) = 0;
     virtual void setCompositorDrivenAcceleratedScrollingEnabled(bool) = 0;
-    virtual void setAcceleratedCompositingForTransitionEnabled(bool)  = 0;
+    // Not implemented yet, see http://crbug.com/178119
+    virtual void setAcceleratedCompositingForTransitionEnabled(bool) { };
     virtual void setAcceleratedCompositingForPluginsEnabled(bool) = 0;
     virtual void setAcceleratedCompositingForScrollableFramesEnabled(bool) = 0;
     virtual void setAcceleratedCompositingForVideoEnabled(bool) = 0;
-    virtual void setAcceleratedFiltersEnabled(bool) = 0;
     virtual void setAllowDisplayOfInsecureContent(bool) = 0;
     virtual void setAllowFileAccessFromFileURLs(bool) = 0;
     virtual void setAllowCustomScrollbarInMainFrame(bool) = 0;
@@ -87,6 +87,7 @@
     virtual void setClobberUserAgentInitialScaleQuirk(bool) = 0;
     virtual void setCompositedScrollingForFramesEnabled(bool) = 0;
     virtual void setCompositorTouchHitTesting(bool) = 0;
+    virtual void setContainerCullingEnabled(bool) = 0;
     virtual void setCookieEnabled(bool) = 0;
     virtual void setNavigateOnDragDrop(bool) = 0;
     virtual void setCursiveFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON) = 0;
@@ -113,9 +114,7 @@
     virtual void setExperimentalWebSocketEnabled(bool) = 0;
     virtual void setFantasyFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON) = 0;
     virtual void setFixedFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON) = 0;
-    virtual void setFixedPositionCreatesStackingContext(bool) = 0;
     virtual void setForceCompositingMode(bool) = 0;
-    virtual void setFullScreenEnabled(bool) = 0;
     virtual void setGestureTapHighlightEnabled(bool) = 0;
     virtual void setHyperlinkAuditingEnabled(bool) = 0;
     virtual void setIgnoreMainFrameOverflowHiddenQuirk(bool) = 0;
@@ -133,7 +132,6 @@
     virtual void setMainFrameResizesAreOrientationChanges(bool) = 0;
     virtual void setMaxTouchPoints(int) = 0;
     virtual void setMediaPlaybackRequiresUserGesture(bool) = 0;
-    virtual void setMediaFullscreenRequiresUserGesture(bool) = 0;
     virtual void setMinimumAccelerated2dCanvasSize(int) = 0;
     virtual void setMinimumFontSize(int) = 0;
     virtual void setMinimumLogicalFontSize(int) = 0;
@@ -200,6 +198,10 @@
     virtual void setWideViewportQuirkEnabled(bool) = 0;
     virtual void setXSSAuditorEnabled(bool) = 0;
 
+    // FIXME: Remove these unused settings.
+    virtual void setFixedPositionCreatesStackingContext(bool) { }
+    virtual void setFullScreenEnabled(bool) { }
+
 protected:
     ~WebSettings() { }
 };
diff --git a/public/web/WebTestingSupport.h b/public/web/WebTestingSupport.h
index 5d3ace8..33f316a 100644
--- a/public/web/WebTestingSupport.h
+++ b/public/web/WebTestingSupport.h
@@ -27,15 +27,14 @@
 #define WebTestingSupport_h
 
 #include "../platform/WebCommon.h"
+#include "WebFrame.h"
 
 namespace blink {
 
-class WebFrame;
-
 class WebTestingSupport {
 public:
-    BLINK_EXPORT static void injectInternalsObject(WebFrame*);
-    BLINK_EXPORT static void resetInternalsObject(WebFrame*);
+    BLINK_EXPORT static void injectInternalsObject(WebLocalFrame*);
+    BLINK_EXPORT static void resetInternalsObject(WebLocalFrame*);
 };
 
 }
diff --git a/public/web/WebView.h b/public/web/WebView.h
index 5d5495c..1c872a9 100644
--- a/public/web/WebView.h
+++ b/public/web/WebView.h
@@ -150,6 +150,7 @@
 
     // Runs beforeunload handlers for the current page, returning false if
     // any handler suppressed unloading.
+    // OBSOLETE; DO NOT USE. Call it on WebFrame instead.
     virtual bool dispatchBeforeUnloadEvent() = 0;
 
     // Runs unload handlers for the current page.
@@ -461,12 +462,6 @@
     // Cancels an active fling, returning true if a fling was active.
     virtual bool endActiveFlingAnimation() = 0;
 
-    virtual bool setEditableSelectionOffsets(int start, int end) = 0;
-    virtual bool setCompositionFromExistingText(int compositionStart, int compositionEnd, const WebVector<WebCompositionUnderline>& underlines) = 0;
-    virtual void extendSelectionAndDelete(int before, int after) = 0;
-
-    virtual bool isSelectionEditable() const = 0;
-
     virtual void setShowPaintRects(bool) = 0;
     virtual void setShowFPSCounter(bool) = 0;
     virtual void setContinuousPaintingEnabled(bool) = 0;
diff --git a/public/web/WebViewClient.h b/public/web/WebViewClient.h
index 1a193b5..42e6f46 100644
--- a/public/web/WebViewClient.h
+++ b/public/web/WebViewClient.h
@@ -39,6 +39,7 @@
 #include "WebDragOperation.h"
 #include "WebFileChooserCompletion.h"
 #include "WebFileChooserParams.h"
+#include "WebFrame.h"
 #include "WebNavigatorContentUtilsClient.h"
 #include "WebPageVisibilityState.h"
 #include "WebPopupType.h"
@@ -58,7 +59,6 @@
 class WebExternalPopupMenu;
 class WebExternalPopupMenuClient;
 class WebFileChooserCompletion;
-class WebFrame;
 class WebGeolocationClient;
 class WebGeolocationService;
 class WebGestureEvent;
@@ -102,7 +102,7 @@
     // could be fulfilled.  The client should not load the request.
     // The policy parameter indicates how the new view will be displayed in
     // WebWidgetClient::show.
-    virtual WebView* createView(WebFrame* creator,
+    virtual WebView* createView(WebLocalFrame* creator,
                                 const WebURLRequest& request,
                                 const WebWindowFeatures& features,
                                 const WebString& name,
@@ -135,7 +135,7 @@
     // non-null, then it selects a particular frame, including its
     // children, to print.  Otherwise, the main frame and its children
     // should be printed.
-    virtual void printPage(WebFrame*) { }
+    virtual void printPage(WebLocalFrame*) { }
 
     // Called to retrieve the provider of desktop notifications.
     virtual WebNotificationPresenter* notificationPresenter() { return 0; }
@@ -146,16 +146,6 @@
     // will never be called.
     virtual bool enumerateChosenDirectory(const WebString& path, WebFileChooserCompletion*) { return false; }
 
-    // Navigational --------------------------------------------------------
-
-    // These notifications bracket any loading that occurs in the WebView.
-    virtual void didStartLoading(bool toDifferentDocument) { }
-    virtual void didStopLoading() { }
-
-    // Notification that some progress was made loading the current page.
-    // loadProgress is a value between 0 (nothing loaded) and 1.0 (frame fully
-    // loaded).
-    virtual void didChangeLoadProgress(WebFrame*, double loadProgress) { }
 
     // Editing -------------------------------------------------------------
 
@@ -219,13 +209,13 @@
     // Displays a modal alert dialog containing the given message.  Returns
     // once the user dismisses the dialog.
     virtual void runModalAlertDialog(
-        WebFrame*, const WebString& message) { }
+        WebLocalFrame*, const WebString& message) { }
 
     // Displays a modal confirmation dialog with the given message as
     // description and OK/Cancel choices.  Returns true if the user selects
     // 'OK' or false otherwise.
     virtual bool runModalConfirmDialog(
-        WebFrame*, const WebString& message) { return false; }
+        WebLocalFrame*, const WebString& message) { return false; }
 
     // Displays a modal input dialog with the given message as description
     // and OK/Cancel choices.  The input field is pre-filled with
@@ -233,7 +223,7 @@
     // otherwise.  Upon returning true, actualValue contains the value of
     // the input field.
     virtual bool runModalPromptDialog(
-        WebFrame*, const WebString& message, const WebString& defaultValue,
+        WebLocalFrame*, const WebString& message, const WebString& defaultValue,
         WebString* actualValue) { return false; }
 
     // Displays a modal confirmation dialog containing the given message as
@@ -241,7 +231,7 @@
     // to proceed with closing the view.  Returns true if the user selects
     // 'OK' or false otherwise.
     virtual bool runModalBeforeUnloadDialog(
-        WebFrame*, const WebString& message) { return true; }
+        WebLocalFrame*, const WebString& message) { return true; }
 
 
     // UI ------------------------------------------------------------------
@@ -256,7 +246,7 @@
     virtual void setKeyboardFocusURL(const WebURL&) { }
 
     // Called when a drag-n-drop operation should begin.
-    virtual void startDragging(WebFrame*, const WebDragData&, WebDragOperationsMask, const WebImage&, const WebPoint& dragImageOffset) { }
+    virtual void startDragging(WebLocalFrame*, const WebDragData&, WebDragOperationsMask, const WebImage&, const WebPoint& dragImageOffset) { }
 
     // Called to determine if drag-n-drop operations may initiate a page
     // navigation.
diff --git a/public/web/mac/WebInputEventFactory.h b/public/web/mac/WebInputEventFactory.h
index 5aad96d..d09c32a 100644
--- a/public/web/mac/WebInputEventFactory.h
+++ b/public/web/mac/WebInputEventFactory.h
@@ -53,7 +53,9 @@
     BLINK_EXPORT static WebKeyboardEvent keyboardEvent(NSEvent*);
     BLINK_EXPORT static WebKeyboardEvent keyboardEvent(wchar_t character, int modifiers, double timeStampSeconds);
     BLINK_EXPORT static WebMouseEvent mouseEvent(NSEvent*, NSView*);
+    // TODO(erikchen): Remove this method once chrome has been updated to use the method with 4 parameters.
     BLINK_EXPORT static WebMouseWheelEvent mouseWheelEvent(NSEvent*, NSView*);
+    BLINK_EXPORT static WebMouseWheelEvent mouseWheelEvent(NSEvent*, NSView*, bool canRubberbandLeft, bool canRubberbandRight);
     BLINK_EXPORT static WebGestureEvent gestureEvent(NSEvent *, NSView *);
     BLINK_EXPORT static bool isSystemKeyEvent(const WebKeyboardEvent&);
 };
diff --git a/public/web/mac/WebSubstringUtil.h b/public/web/mac/WebSubstringUtil.h
index 13b1547..730036d 100644
--- a/public/web/mac/WebSubstringUtil.h
+++ b/public/web/mac/WebSubstringUtil.h
@@ -32,13 +32,11 @@
 #define WebSubstringUtil_h
 
 #include "../../platform/WebCommon.h"
+#include "public/web/WebFrame.h"
 
 namespace blink {
-class WebFrame;
-class WebRange;
 class WebView;
 struct WebPoint;
-struct WebRect;
 }
 
 #if __OBJC__
@@ -61,7 +59,7 @@
 
     // Returns an autoreleased NSAttributedString that is a substring of the
     // Frame at the given range, or nil on error.
-    BLINK_EXPORT static NSAttributedString* attributedSubstringInRange(WebFrame*,
+    BLINK_EXPORT static NSAttributedString* attributedSubstringInRange(WebLocalFrame*,
         size_t location,
         size_t length);
 };
diff --git a/public/web/win/WebFontRendering.h b/public/web/win/WebFontRendering.h
new file mode 100644
index 0000000..cb02595
--- /dev/null
+++ b/public/web/win/WebFontRendering.h
@@ -0,0 +1,20 @@
+// Copyright 2014 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WebFontRendering_h
+#define WebFontRendering_h
+
+#include "public/platform/WebCommon.h"
+
+namespace blink {
+
+class WebFontRendering {
+public:
+    BLINK_EXPORT static void setUseDirectWrite(bool);
+    BLINK_EXPORT static void setUseSubpixelPositioning(bool);
+};
+
+} // namespace blink
+
+#endif