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

Unified Diff: components/web_view/public/interfaces/frame_tree.mojom

Issue 1347023003: Rename frame classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 5 years, 3 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 | « components/web_view/public/interfaces/frame.mojom ('k') | components/web_view/test_frame_tree_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/web_view/public/interfaces/frame_tree.mojom
diff --git a/components/web_view/public/interfaces/frame_tree.mojom b/components/web_view/public/interfaces/frame_tree.mojom
deleted file mode 100644
index 0823f6ef53828a631c1c5fa28d49915a39a0cf1b..0000000000000000000000000000000000000000
--- a/components/web_view/public/interfaces/frame_tree.mojom
+++ /dev/null
@@ -1,164 +0,0 @@
-// Copyright 2015 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.
-
-module web_view;
-
-import "network/public/interfaces/url_loader.mojom";
-
-// This files defines the interfaces and structures used for frames.
-//
-// When a client in the frame tree is connected to by way of the ViewManager a
-// FrameTreeClient is obtained (from the ServiceProvider interface request
-// passed in ViewManager::OnEmbed()). The FrameTreeClient is told the frame
-// tree (by way of OnConnection()), which allows the client to use other
-// frames in the tree (assuming the client has the appropriate permissions).
-//
-// frame_ids are the same as views ids. This means that when a client creates
-// a new view to be part of the frame tree it immediately knows the id to use
-// for FrameTreeServer calls.
-//
-// The server provides an id that may be used to identify the state of the
-// tree. The change id is an integer that is incremented every time the
-// structure of the tree changes. The change id is not used by the server; the
-// server only updates the change id and notifies clients of the new id (by
-// way of structure change functions such as OnFrameAdded()).
-
-// Expresses a preference for where a navigation should occur.
-enum NavigationTargetType {
- // No preference.
- NO_PREFERENCE,
-
- // In the specified frame.
- EXISTING_FRAME,
-
- // In a new frame.
- NEW_FRAME,
-};
-
-// Provides information about a frame.
-struct FrameData {
- // 0 if the frame has no parent (its the root).
- uint32 parent_id;
- uint32 frame_id;
-
- // A map of the properties supplied by the client. The server does not
- // intepret these values in anyway, the meaning and usage is left up to
- // clients.
- map<string, array<uint8>>? client_properties;
-};
-
-// TODO(sky): decide which bits of this make sense for all frames, and move the
-// html specific parts into properties.
-struct HTMLMessageEvent {
- // The serialized script value.
- array<uint8>? data;
-
- // The origin of the source frame.
- string source_origin;
-
- // The origin for the message's target.
- string? target_origin;
-
- // TODO(sky): these two are not implemented. Figure out what they should be.
- // Information about the MessagePorts this message contains.
- // IPC_STRUCT_MEMBER(std::vector<content::TransferredMessagePort>, message_ports)
- // IPC_STRUCT_MEMBER(std::vector<int>, new_routing_ids)
-};
-
-interface FrameTreeServer {
- // Requests the server to message the specified frame with |event|. If the
- // operation is allowed OnPostMessageEvent() is called on the appropriate
- // FrameTreeClient.
- PostMessageEventToFrame(uint32 target_frame_id, HTMLMessageEvent event);
-
- // Notifies the server that the loading state and progress changed.
- LoadingStateChanged(bool loading, double progress);
-
- // Called when the title becomes available or changes.
- TitleChanged(string? title);
-
- // Called when the response body has been received.
- DidCommitProvisionalLoad();
-
- // Sets the value of the specified client property, notifying clients if the
- // value changed. If |value| is null the property is removed.
- SetClientProperty(string name, array<uint8>? value);
-
- // Called when the client creates a new frame. |frame_id| corresponds to
- // the id of the view hosting the frame, and |parent_id| the id of the
- // parent. See FrameData::client_properties for details of
- // |client_properties|.
- //
- // Note that the FrameTreeClient still gets an OnConnect(), but the only
- // thing of interest is the callback.
- OnCreatedFrame(FrameTreeServer& server_request,
- FrameTreeClient client,
- uint32 frame_id,
- map<string, array<uint8>> client_properties);
-
- // Requests a navigation. If |target_TYPE| is |EXISTING_FRAME|, then
- // |target_frame_id| identifies the frame to navigate in. Otherwise
- // |target_frame_id| is unused.
- RequestNavigate(NavigationTargetType target_type,
- uint32 target_frame_id,
- mojo.URLRequest request);
-
- // The frame navigated locally, for example, pushState() navigations in an
- // HTML application.
- DidNavigateLocally(string url);
-
- // Dispatches a load event to the parent of the frame.
- DispatchLoadEventToParent();
-};
-
-enum ViewConnectType {
- // Indicates the app is already a ViewTreeClient and the existing view should
- // be used. In this case the app is not asked for a new ViewTreeClient.
- USE_EXISTING,
-
- // Indicates a new ViewTreeClient is obtained and the View provided to
- // OnEmbed() should be used.
- USE_NEW
-};
-
-interface FrameTreeClient {
- // Called once per client. |frame_data| gives the contents of the tree.
- // |view_id| is the id of the view the FrameTreeClient should render to. If
- // a ViewTreeClient is asked for then |view_id| is the same id as that of the
- // View supplied to ViewTreeClient::OnEmbed().
- OnConnect(FrameTreeServer? server,
- uint32 change_id,
- uint32 view_id,
- ViewConnectType view_connect_type,
- array<FrameData>? frame_data) => ();
-
- // Called when a new frame is added to the tree.
- OnFrameAdded(uint32 change_id, FrameData frame_data);
-
- // Called when a frame is removed from the tree.
- OnFrameRemoved(uint32 change_id, uint32 frame_id);
-
- // Called when a client property changes.
- OnFrameClientPropertyChanged(uint32 frame_id,
- string name,
- array<uint8>? new_value);
-
- // See description in PostMessageEventToFrame().
- OnPostMessageEvent(uint32 source_frame_id,
- uint32 target_frame_id,
- HTMLMessageEvent event);
-
- // Called prior to starting a new navigation. This is only called on the
- // FrameTreeClient that is rendering to the frame, and only when another
- // content handler is going to start handling the rendering.
- OnWillNavigate();
-
- // Called to notify that |frame_id|'s loading state has changed. This is only
- // called on the FrameTreeClient rendering the parent of |frame_id|.
- OnFrameLoadingStateChanged(uint32 frame_id, bool loading);
-
- // Called to dispatch a load event of |frame_id| in its parent. This is only
- // called on the FrameTreeClient rendering the parent of |frame_id|.
- OnDispatchFrameLoadEvent(uint32 frame_id);
-};
« no previous file with comments | « components/web_view/public/interfaces/frame.mojom ('k') | components/web_view/test_frame_tree_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698