OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_WEB_VIEW_PENDING_WEB_VIEW_LOAD_H_ | 5 #ifndef COMPONENTS_WEB_VIEW_PENDING_WEB_VIEW_LOAD_H_ |
6 #define COMPONENTS_WEB_VIEW_PENDING_WEB_VIEW_LOAD_H_ | 6 #define COMPONENTS_WEB_VIEW_PENDING_WEB_VIEW_LOAD_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
| 9 #include <utility> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 #include "base/time/time.h" | 13 #include "base/time/time.h" |
13 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" | 14 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" |
14 #include "url/gurl.h" | 15 #include "url/gurl.h" |
15 | 16 |
16 namespace web_view { | 17 namespace web_view { |
17 | 18 |
18 class FrameConnection; | 19 class FrameConnection; |
19 class WebViewImpl; | 20 class WebViewImpl; |
20 | 21 |
21 // PendingWebViewLoad holds the state necessary to service a load of the main | 22 // PendingWebViewLoad holds the state necessary to service a load of the main |
22 // frame. Once the necessary state has been obtained the load is started. | 23 // frame. Once the necessary state has been obtained the load is started. |
23 class PendingWebViewLoad { | 24 class PendingWebViewLoad { |
24 public: | 25 public: |
25 explicit PendingWebViewLoad(WebViewImpl* web_view); | 26 explicit PendingWebViewLoad(WebViewImpl* web_view); |
26 ~PendingWebViewLoad(); | 27 ~PendingWebViewLoad(); |
27 | 28 |
28 void Init(mojo::URLRequestPtr request); | 29 void Init(mojo::URLRequestPtr request); |
29 | 30 |
30 scoped_ptr<FrameConnection> frame_connection() { | 31 scoped_ptr<FrameConnection> frame_connection() { |
31 return frame_connection_.Pass(); | 32 return std::move(frame_connection_); |
32 } | 33 } |
33 | 34 |
34 bool is_content_handler_id_valid() const { | 35 bool is_content_handler_id_valid() const { |
35 return is_content_handler_id_valid_; | 36 return is_content_handler_id_valid_; |
36 } | 37 } |
37 | 38 |
38 const GURL& pending_url() const { return pending_url_; } | 39 const GURL& pending_url() const { return pending_url_; } |
39 | 40 |
40 base::TimeTicks navigation_start_time() const { | 41 base::TimeTicks navigation_start_time() const { |
41 return navigation_start_time_; | 42 return navigation_start_time_; |
(...skipping 10 matching lines...) Expand all Loading... |
52 scoped_ptr<FrameConnection> frame_connection_; | 53 scoped_ptr<FrameConnection> frame_connection_; |
53 | 54 |
54 base::TimeTicks navigation_start_time_; | 55 base::TimeTicks navigation_start_time_; |
55 | 56 |
56 DISALLOW_COPY_AND_ASSIGN(PendingWebViewLoad); | 57 DISALLOW_COPY_AND_ASSIGN(PendingWebViewLoad); |
57 }; | 58 }; |
58 | 59 |
59 } // namespace web_view | 60 } // namespace web_view |
60 | 61 |
61 #endif // COMPONENTS_WEB_VIEW_PENDING_WEB_VIEW_LOAD_H_ | 62 #endif // COMPONENTS_WEB_VIEW_PENDING_WEB_VIEW_LOAD_H_ |
OLD | NEW |