| Index: components/web_view/frame.h
|
| diff --git a/components/web_view/frame.h b/components/web_view/frame.h
|
| index 7b6a96a6dd9e94848feab0467e880a744a04d30e..508aad9920bb4f2b7f82bdae4dcfb8b7523fda5f 100644
|
| --- a/components/web_view/frame.h
|
| +++ b/components/web_view/frame.h
|
| @@ -28,27 +28,27 @@ namespace mojom {
|
| class FrameClient;
|
| }
|
|
|
| -enum class ViewOwnership {
|
| - OWNS_VIEW,
|
| - DOESNT_OWN_VIEW,
|
| +enum class WindowOwnership {
|
| + OWNS_WINDOW,
|
| + DOESNT_OWN_WINDOW,
|
| };
|
|
|
| // Frame represents an embedding in a frame. Frames own their children.
|
| -// Frames automatically delete themself if the View the frame is associated
|
| +// Frames automatically delete themself if the Window the frame is associated
|
| // with is deleted.
|
| //
|
| -// In general each Frame has a View. When a new Frame is created by a client
|
| -// there may be a small amount of time where the View is not yet known
|
| -// (separate pipes are used for the view and frame, resulting in undefined
|
| -// message ordering). In this case the view is null and will be set once we
|
| -// see the view (OnTreeChanged()).
|
| +// In general each Frame has a Window. When a new Frame is created by a client
|
| +// there may be a small amount of time where the Window is not yet known
|
| +// (separate pipes are used for the window and frame, resulting in undefined
|
| +// message ordering). In this case the window is null and will be set once we
|
| +// see the window (OnTreeChanged()).
|
| //
|
| // Each frame has an identifier of the app providing the FrameClient
|
| // (|app_id|). This id is used when servicing a request to navigate the frame.
|
| // When navigating, if the id of the new app matches that of the existing app,
|
| // then it is expected that the new FrameClient will take over rendering to the
|
| -// existing view. Because of this a new WindowTreeClient is not obtained and
|
| -// Embed() is not invoked on the View. The FrameClient can detect this case by
|
| +// existing window. Because of this a new WindowTreeClient is not obtained and
|
| +// Embed() is not invoked on the Window. The FrameClient can detect this case by
|
| // the argument |reuse_existing_view| supplied to OnConnect(). Typically the id
|
| // is that of content handler id, but this is left up to the FrameTreeDelegate
|
| // to decide.
|
| @@ -58,10 +58,10 @@ class Frame : public mus::WindowObserver, public mojom::Frame {
|
| using FindCallback = mojo::Callback<void(bool)>;
|
|
|
| Frame(FrameTree* tree,
|
| - mus::Window* view,
|
| + mus::Window* window,
|
| uint32_t frame_id,
|
| uint32_t app_id,
|
| - ViewOwnership view_ownership,
|
| + WindowOwnership window_ownership,
|
| mojom::FrameClient* frame_client,
|
| scoped_ptr<FrameUserData> user_data,
|
| const ClientPropertyMap& client_properties);
|
| @@ -72,19 +72,19 @@ class Frame : public mus::WindowObserver, public mojom::Frame {
|
| mojo::InterfaceRequest<mojom::Frame> frame_request,
|
| base::TimeTicks navigation_start_time);
|
|
|
| - // Walks the View tree starting at |view| going up returning the first
|
| - // Frame that is associated with |view|. For example, if |view|
|
| + // Walks the Window tree starting at |window| going up returning the first
|
| + // Frame that is associated with |window|. For example, if |window|
|
| // has a Frame associated with it, then that is returned. Otherwise
|
| - // this checks view->parent() and so on.
|
| - static Frame* FindFirstFrameAncestor(mus::Window* view);
|
| + // this checks window->parent() and so on.
|
| + static Frame* FindFirstFrameAncestor(mus::Window* window);
|
|
|
| FrameTree* tree() { return tree_; }
|
|
|
| Frame* parent() { return parent_; }
|
| const Frame* parent() const { return parent_; }
|
|
|
| - mus::Window* view() { return view_; }
|
| - const mus::Window* view() const { return view_; }
|
| + mus::Window* window() { return window_; }
|
| + const mus::Window* window() const { return window_; }
|
|
|
| uint32_t id() const { return id_; }
|
|
|
| @@ -187,7 +187,7 @@ class Frame : public mus::WindowObserver, public mojom::Frame {
|
| uint32 app_id,
|
| base::TimeTicks navigation_start_time);
|
|
|
| - void SetView(mus::Window* view);
|
| + void SetWindow(mus::Window* window);
|
|
|
| // Adds this to |frames| and recurses through the children calling the
|
| // same function.
|
| @@ -197,8 +197,8 @@ class Frame : public mus::WindowObserver, public mojom::Frame {
|
| void Remove(Frame* node);
|
|
|
| // Starts a new navigation to |request|. The navigation proceeds as long
|
| - // as there is a View and once OnWillNavigate() has returned. If there is
|
| - // no View the navigation waits until the View is available.
|
| + // as there is a Window and once OnWillNavigate() has returned. If there is
|
| + // no Window the navigation waits until the Window is available.
|
| void StartNavigate(mojo::URLRequestPtr request);
|
| void OnCanNavigateFrame(const GURL& url,
|
| base::TimeTicks navigation_start_time,
|
| @@ -222,8 +222,8 @@ class Frame : public mus::WindowObserver, public mojom::Frame {
|
|
|
| // mus::WindowObserver:
|
| void OnTreeChanged(const TreeChangeParams& params) override;
|
| - void OnWindowDestroying(mus::Window* view) override;
|
| - void OnWindowEmbeddedAppDisconnected(mus::Window* view) override;
|
| + void OnWindowDestroying(mus::Window* window) override;
|
| + void OnWindowEmbeddedAppDisconnected(mus::Window* window) override;
|
|
|
| // mojom::Frame:
|
| void PostMessageEventToFrame(uint32_t target_frame_id,
|
| @@ -251,16 +251,16 @@ class Frame : public mus::WindowObserver, public mojom::Frame {
|
|
|
| FrameTree* const tree_;
|
| // WARNING: this may be null. See class description for details.
|
| - mus::Window* view_;
|
| - // The connection id returned from ViewManager::Embed(). Frames created by
|
| + mus::Window* window_;
|
| + // The connection id returned from WindowManager::Embed(). Frames created by
|
| // way of OnCreatedFrame() inherit the id from the parent.
|
| mus::ConnectionSpecificId embedded_connection_id_;
|
| - // ID for the frame, which is the same as that of the view.
|
| + // ID for the frame, which is the same as that of the window.
|
| const uint32_t id_;
|
| // ID of the app providing the FrameClient and WindowTreeClient.
|
| uint32_t app_id_;
|
| Frame* parent_;
|
| - ViewOwnership view_ownership_;
|
| + WindowOwnership window_ownership_;
|
| std::vector<Frame*> children_;
|
| scoped_ptr<FrameUserData> user_data_;
|
|
|
| @@ -271,7 +271,7 @@ class Frame : public mus::WindowObserver, public mojom::Frame {
|
|
|
| ClientPropertyMap client_properties_;
|
|
|
| - // StartNavigate() stores the request here if the view isn't available at
|
| + // StartNavigate() stores the request here if the window isn't available at
|
| // the time of StartNavigate().
|
| mojo::URLRequestPtr pending_navigate_;
|
|
|
|
|