Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Unified Diff: sky/engine/public/web/WebFrameClient.h

Issue 1210153009: Remove (almost all of) //sky/engine/web (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/public/web/WebFrame.h ('k') | sky/engine/public/web/WebLocalFrame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/public/web/WebFrameClient.h
diff --git a/sky/engine/public/web/WebFrameClient.h b/sky/engine/public/web/WebFrameClient.h
deleted file mode 100644
index 5954d972fd99402a66064451025ba90ed733f2f3..0000000000000000000000000000000000000000
--- a/sky/engine/public/web/WebFrameClient.h
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SKY_ENGINE_PUBLIC_WEB_WEBFRAMECLIENT_H_
-#define SKY_ENGINE_PUBLIC_WEB_WEBFRAMECLIENT_H_
-
-#include "../platform/WebColor.h"
-#include "sky/engine/public/platform/WebCommon.h"
-#include "sky/engine/public/platform/WebURLError.h"
-#include "sky/engine/public/platform/WebURLRequest.h"
-#include "sky/engine/public/web/WebFrame.h"
-#include "sky/engine/public/web/WebNavigationPolicy.h"
-#include "sky/engine/public/web/WebNavigationType.h"
-#include "sky/engine/public/web/WebTextDirection.h"
-
-typedef struct _Dart_Isolate* Dart_Isolate;
-
-namespace mojo {
-class View;
-}
-
-namespace blink {
-
-class WebCachedURLRequest;
-class WebInputEvent;
-class WebNode;
-class WebString;
-class WebURL;
-class WebURLLoader;
-class WebURLResponse;
-struct WebConsoleMessage;
-struct WebRect;
-struct WebSize;
-struct WebURLError;
-
-class WebFrameClient {
-public:
- // General notifications -----------------------------------------------
-
- // 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
- // frame and returns a new WebFrame. The WebFrame is considered in-use
- // until frameDetached() is called on it.
- // Note: If you override this, you should almost certainly be overriding
- // frameDetached().
- virtual mojo::View* createChildFrame() { return nullptr; }
-
- // This frame has been detached from the view, but has not been closed yet.
- // TODO(mpcomplete): reuse these.
- virtual void frameDetached(WebFrame*) { }
-
- // This frame has become focused..
- virtual void frameFocused() { }
-
- // 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*) { }
-
- // FIXME(sky): remove.
- // Called when a watched CSS selector matches or stops matching.
- virtual void didMatchCSS(WebLocalFrame*, const WebVector<WebString>& newlyMatchingSelectors, const WebVector<WebString>& stoppedMatchingSelectors) { }
-
- virtual void didCreateIsolate(WebLocalFrame*, Dart_Isolate isolate) {}
-
- // Console messages ----------------------------------------------------
-
- // Whether or not we should report a detailed message for the given source.
- virtual bool shouldReportDetailedMessageForSource(const WebString& source) { return false; }
-
- // A new message was added to the console.
- virtual void didAddMessageToConsole(const WebConsoleMessage&, const WebString& sourceName, unsigned sourceLine, const WebString& stackTrace) { }
-
-
- // Load commands -------------------------------------------------------
-
- // The client should handle the navigation externally.
- virtual void loadURLExternally(
- WebLocalFrame*, const WebURLRequest&, WebNavigationPolicy, const WebString& downloadName) { }
-
-
- // Navigational queries ------------------------------------------------
-
- // The client may choose to alter the navigation policy. Otherwise,
- // defaultPolicy should just be returned.
-
- struct NavigationPolicyInfo {
- WebLocalFrame* frame;
- const WebURLRequest& urlRequest;
- WebNavigationType navigationType;
- WebNavigationPolicy defaultPolicy;
- bool isTransitionNavigation;
-
- NavigationPolicyInfo(const WebURLRequest& urlRequest)
- : frame(0)
- , urlRequest(urlRequest)
- , navigationType(WebNavigationTypeOther)
- , defaultPolicy(WebNavigationPolicyIgnore)
- , isTransitionNavigation(false) { }
- };
-
- virtual WebNavigationPolicy decidePolicyForNavigation(const NavigationPolicyInfo& info)
- {
- return info.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) { }
-
- // The document element has been created.
- virtual void didCreateDocumentElement(WebLocalFrame*) { }
-
- // The page title is available.
- virtual void didReceiveTitle(WebLocalFrame* frame, const WebString& title, WebTextDirection direction) { }
-
- // The 'load' event was dispatched.
- virtual void didHandleOnloadEvents(WebLocalFrame*) { }
-
- // The frame's document or one of its subresources failed to load.
- virtual void didFailLoad(WebLocalFrame*, const WebURLError&) { }
-
- // The frame's manifest has changed.
- virtual void didChangeManifest(WebLocalFrame*) { }
-
-
- // Transition navigations -----------------------------------------------
-
- // Provides serialized markup of transition elements for use in the following navigation.
- virtual void addNavigationTransitionData(const WebString& allowedDestinationOrigin, const WebString& selector, const WebString& markup) { }
-
- // Editing -------------------------------------------------------------
-
- // These methods allow the client to intercept and overrule editing
- // operations.
- virtual void didChangeSelection(bool isSelectionEmpty) { }
-
- // Low-level resource notifications ------------------------------------
-
- // An element will request a resource.
- virtual void willRequestResource(WebLocalFrame*, const WebCachedURLRequest&) { }
-
- // 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(
- WebLocalFrame*, unsigned identifier, WebURLRequest&,
- const WebURLResponse& redirectResponse) { }
-
- // Response headers have been received for the resource request given
- // by identifier.
- virtual void didReceiveResponse(
- WebLocalFrame*, unsigned identifier, const WebURLResponse&) { }
-
- virtual void didChangeResourcePriority(
- WebLocalFrame* webFrame, unsigned identifier, const WebURLRequest::Priority& priority, int) { }
-
- // The resource request given by identifier succeeded.
- virtual void didFinishResourceLoad(
- WebLocalFrame*, unsigned identifier) { }
-
- // The specified request was satified from WebCore's memory cache.
- virtual void didLoadResourceFromMemoryCache(
- WebLocalFrame*, const WebURLRequest&, const WebURLResponse&) { }
-
-
- // Geometry notifications ----------------------------------------------
-
- // The main frame scrolled.
- virtual void didChangeScrollOffset(WebLocalFrame*) { }
-
-
- // Find-in-page notifications ------------------------------------------
-
- // Notifies how many matches have been found so far, for a given
- // identifier. |finalUpdate| specifies whether this is the last update
- // (all frames have completed scoping).
- virtual void reportFindInPageMatchCount(
- int identifier, int count, bool finalUpdate) { }
-
- // Notifies what tick-mark rect is currently selected. The given
- // identifier lets the client know which request this message belongs
- // to, so that it can choose to ignore the message if it has moved on
- // to other things. The selection rect is expected to have coordinates
- // relative to the top left corner of the web page area and represent
- // where on the screen the selection rect is currently located.
- virtual void reportFindInPageSelection(
- int identifier, int activeMatchOrdinal, const WebRect& selection) { }
-
-
- // WebGL ------------------------------------------------------
-
- // 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(WebLocalFrame*, int) { }
-
-protected:
- virtual ~WebFrameClient() { }
-};
-
-} // namespace blink
-
-#endif // SKY_ENGINE_PUBLIC_WEB_WEBFRAMECLIENT_H_
« no previous file with comments | « sky/engine/public/web/WebFrame.h ('k') | sky/engine/public/web/WebLocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698