blob: ac8415b90bde5930956c763a507905ee737b5f15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
// 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.
#ifndef COMPONENTS_WEB_VIEW_PENDING_WEB_VIEW_LOAD_H_
#define COMPONENTS_WEB_VIEW_PENDING_WEB_VIEW_LOAD_H_
#include <string>
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "mojo/services/network/public/interfaces/url_loader.mojom.h"
#include "url/gurl.h"
namespace web_view {
class FrameConnection;
class WebViewImpl;
// PendingWebViewLoad holds the state necessary to service a load of the main
// frame. Once the necessary state has been obtained the load is started.
class PendingWebViewLoad {
public:
explicit PendingWebViewLoad(WebViewImpl* web_view);
~PendingWebViewLoad();
void Init(mojo::URLRequestPtr request);
scoped_ptr<FrameConnection> frame_connection() {
return frame_connection_.Pass();
}
bool is_content_handler_id_valid() const {
return is_content_handler_id_valid_;
}
const GURL& pending_url() const { return pending_url_; }
base::TimeTicks navigation_start_time() const {
return navigation_start_time_;
}
private:
void OnGotContentHandlerID();
WebViewImpl* web_view_;
GURL pending_url_;
bool is_content_handler_id_valid_;
scoped_ptr<FrameConnection> frame_connection_;
base::TimeTicks navigation_start_time_;
DISALLOW_COPY_AND_ASSIGN(PendingWebViewLoad);
};
} // namespace web_view
#endif // COMPONENTS_WEB_VIEW_PENDING_WEB_VIEW_LOAD_H_
|