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

Side by Side Diff: components/html_viewer/html_frame.h

Issue 1391963004: Correctly record and pass around navigation start time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « components/html_viewer/html_document.cc ('k') | components/html_viewer/html_frame.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_HTML_VIEWER_HTML_FRAME_H_ 5 #ifndef COMPONENTS_HTML_VIEWER_HTML_FRAME_H_
6 #define COMPONENTS_HTML_VIEWER_HTML_FRAME_H_ 6 #define COMPONENTS_HTML_VIEWER_HTML_FRAME_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/time/time.h"
12 #include "cc/layers/surface_layer.h" 13 #include "cc/layers/surface_layer.h"
13 #include "components/html_viewer/html_frame_tree_manager.h" 14 #include "components/html_viewer/html_frame_tree_manager.h"
14 #include "components/html_viewer/replicated_frame_state.h" 15 #include "components/html_viewer/replicated_frame_state.h"
15 #include "components/mus/public/cpp/view_observer.h" 16 #include "components/mus/public/cpp/view_observer.h"
16 #include "components/web_view/public/interfaces/frame.mojom.h" 17 #include "components/web_view/public/interfaces/frame.mojom.h"
17 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" 18 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h"
18 #include "third_party/WebKit/public/platform/WebURLRequest.h" 19 #include "third_party/WebKit/public/platform/WebURLRequest.h"
19 #include "third_party/WebKit/public/web/WebFrameClient.h" 20 #include "third_party/WebKit/public/web/WebFrameClient.h"
20 #include "third_party/WebKit/public/web/WebRemoteFrameClient.h" 21 #include "third_party/WebKit/public/web/WebRemoteFrameClient.h"
21 #include "third_party/WebKit/public/web/WebSandboxFlags.h" 22 #include "third_party/WebKit/public/web/WebSandboxFlags.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // Returns null if the browser side didn't request to setup an agent in this 141 // Returns null if the browser side didn't request to setup an agent in this
141 // frame. 142 // frame.
142 DevToolsAgentImpl* devtools_agent() { return devtools_agent_.get(); } 143 DevToolsAgentImpl* devtools_agent() { return devtools_agent_.get(); }
143 144
144 // Returns true if the Frame is local, false if remote. 145 // Returns true if the Frame is local, false if remote.
145 bool IsLocal() const; 146 bool IsLocal() const;
146 147
147 // Returns true if this or one of the frames descendants is local. 148 // Returns true if this or one of the frames descendants is local.
148 bool HasLocalDescendant() const; 149 bool HasLocalDescendant() const;
149 150
150 void LoadRequest(const blink::WebURLRequest& request); 151 void LoadRequest(const blink::WebURLRequest& request,
152 base::TimeTicks navigation_start_time);
151 153
152 protected: 154 protected:
153 virtual ~HTMLFrame(); 155 virtual ~HTMLFrame();
154 156
155 // WebFrameClient methods: 157 // WebFrameClient methods:
156 virtual blink::WebMediaPlayer* createMediaPlayer( 158 virtual blink::WebMediaPlayer* createMediaPlayer(
157 blink::WebLocalFrame* frame, 159 blink::WebLocalFrame* frame,
158 const blink::WebURL& url, 160 const blink::WebURL& url,
159 blink::WebMediaPlayerClient* client, 161 blink::WebMediaPlayerClient* client,
160 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, 162 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 void OnViewInputEvent(mus::View* view, const mojo::EventPtr& event) override; 271 void OnViewInputEvent(mus::View* view, const mojo::EventPtr& event) override;
270 void OnViewFocusChanged(mus::View* gained_focus, 272 void OnViewFocusChanged(mus::View* gained_focus,
271 mus::View* lost_focus) override; 273 mus::View* lost_focus) override;
272 274
273 // web_view::mojom::FrameClient: 275 // web_view::mojom::FrameClient:
274 void OnConnect(web_view::mojom::FramePtr server, 276 void OnConnect(web_view::mojom::FramePtr server,
275 uint32_t change_id, 277 uint32_t change_id,
276 uint32_t view_id, 278 uint32_t view_id,
277 web_view::mojom::ViewConnectType view_connect_type, 279 web_view::mojom::ViewConnectType view_connect_type,
278 mojo::Array<web_view::mojom::FrameDataPtr> frame_data, 280 mojo::Array<web_view::mojom::FrameDataPtr> frame_data,
281 int64_t navigation_start_time_ticks,
279 const OnConnectCallback& callback) override; 282 const OnConnectCallback& callback) override;
280 void OnFrameAdded(uint32_t change_id, 283 void OnFrameAdded(uint32_t change_id,
281 web_view::mojom::FrameDataPtr frame_data) override; 284 web_view::mojom::FrameDataPtr frame_data) override;
282 void OnFrameRemoved(uint32_t change_id, uint32_t frame_id) override; 285 void OnFrameRemoved(uint32_t change_id, uint32_t frame_id) override;
283 void OnFrameClientPropertyChanged(uint32_t frame_id, 286 void OnFrameClientPropertyChanged(uint32_t frame_id,
284 const mojo::String& name, 287 const mojo::String& name,
285 mojo::Array<uint8_t> new_value) override; 288 mojo::Array<uint8_t> new_value) override;
286 void OnPostMessageEvent( 289 void OnPostMessageEvent(
287 uint32_t source_frame_id, 290 uint32_t source_frame_id,
288 uint32_t target_frame_id, 291 uint32_t target_frame_id,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 // This object is only valid in the context of performance tests. 357 // This object is only valid in the context of performance tests.
355 tracing::StartupPerformanceDataCollectorPtr 358 tracing::StartupPerformanceDataCollectorPtr
356 startup_performance_data_collector_; 359 startup_performance_data_collector_;
357 360
358 scoped_ptr<DevToolsAgentImpl> devtools_agent_; 361 scoped_ptr<DevToolsAgentImpl> devtools_agent_;
359 362
360 // A navigation request has been sent to the frame server side, and we haven't 363 // A navigation request has been sent to the frame server side, and we haven't
361 // received response to it. 364 // received response to it.
362 bool pending_navigation_; 365 bool pending_navigation_;
363 366
367 base::TimeTicks navigation_start_time_;
368
364 base::WeakPtrFactory<HTMLFrame> weak_factory_; 369 base::WeakPtrFactory<HTMLFrame> weak_factory_;
365 370
366 DISALLOW_COPY_AND_ASSIGN(HTMLFrame); 371 DISALLOW_COPY_AND_ASSIGN(HTMLFrame);
367 }; 372 };
368 373
369 } // namespace html_viewer 374 } // namespace html_viewer
370 375
371 #endif // COMPONENTS_HTML_VIEWER_HTML_FRAME_H_ 376 #endif // COMPONENTS_HTML_VIEWER_HTML_FRAME_H_
OLDNEW
« no previous file with comments | « components/html_viewer/html_document.cc ('k') | components/html_viewer/html_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698