Roll src/third_party/WebKit eac3800:0237a66 (svn 202606:202607)
[chromium-blink-merge.git] / components / web_view / pending_web_view_load.h
blob47bc831f617c1244eaa63219e2a1e65413b44ab6
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_WEB_VIEW_PENDING_WEB_VIEW_LOAD_H_
6 #define COMPONENTS_WEB_VIEW_PENDING_WEB_VIEW_LOAD_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "mojo/services/network/public/interfaces/url_loader.mojom.h"
11 namespace web_view {
13 class FrameConnection;
14 class WebViewImpl;
16 // PendingWebViewLoad holds the state necessary to service a load of the main
17 // frame. Once the necessary state has been obtained the load is started.
18 class PendingWebViewLoad {
19 public:
20 explicit PendingWebViewLoad(WebViewImpl* web_view);
21 ~PendingWebViewLoad();
23 void Init(mojo::URLRequestPtr request);
25 scoped_ptr<FrameConnection> frame_connection() {
26 return frame_connection_.Pass();
29 bool is_content_handler_id_valid() const {
30 return is_content_handler_id_valid_;
33 private:
34 void OnGotContentHandlerID();
36 WebViewImpl* web_view_;
38 bool is_content_handler_id_valid_;
40 scoped_ptr<FrameConnection> frame_connection_;
42 DISALLOW_COPY_AND_ASSIGN(PendingWebViewLoad);
45 } // namespace web_view
47 #endif // COMPONENTS_WEB_VIEW_PENDING_WEB_VIEW_LOAD_H_