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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 190693002: Migrate Telemetry from beginWindowSnapshotPNG to Page.captureScreenshot (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 virtual void WasResized() OVERRIDE; 170 virtual void WasResized() OVERRIDE;
171 virtual void AddKeyPressEventCallback( 171 virtual void AddKeyPressEventCallback(
172 const KeyPressEventCallback& callback) OVERRIDE; 172 const KeyPressEventCallback& callback) OVERRIDE;
173 virtual void RemoveKeyPressEventCallback( 173 virtual void RemoveKeyPressEventCallback(
174 const KeyPressEventCallback& callback) OVERRIDE; 174 const KeyPressEventCallback& callback) OVERRIDE;
175 virtual void AddMouseEventCallback( 175 virtual void AddMouseEventCallback(
176 const MouseEventCallback& callback) OVERRIDE; 176 const MouseEventCallback& callback) OVERRIDE;
177 virtual void RemoveMouseEventCallback( 177 virtual void RemoveMouseEventCallback(
178 const MouseEventCallback& callback) OVERRIDE; 178 const MouseEventCallback& callback) OVERRIDE;
179 virtual void GetWebScreenInfo(blink::WebScreenInfo* result) OVERRIDE; 179 virtual void GetWebScreenInfo(blink::WebScreenInfo* result) OVERRIDE;
180 virtual void GetSnapshotFromRenderer( 180 virtual void GetSnapshotFromRenderer(
pfeldman 2014/03/07 12:21:22 It looks like this method is the wrong way of doin
Vladislav Kaznacheev 2014/03/11 13:08:56 This method is used when the compositor is not ava
181 const gfx::Rect& src_subrect, 181 const gfx::Rect& src_subrect,
182 const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE; 182 const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE;
183 183
184 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const; 184 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const;
185 185
186 // Notification that the screen info has changed. 186 // Notification that the screen info has changed.
187 void NotifyScreenInfoChanged(); 187 void NotifyScreenInfoChanged();
188 188
189 // Invalidates the cached screen info so that next resize request 189 // Invalidates the cached screen info so that next resize request
190 // will carry the up to date screen info. Unlike 190 // will carry the up to date screen info. Unlike
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 // Returns the ID that uniquely describes this component to the latency 545 // Returns the ID that uniquely describes this component to the latency
546 // subsystem. 546 // subsystem.
547 int64 GetLatencyComponentId(); 547 int64 GetLatencyComponentId();
548 548
549 static void CompositorFrameDrawn( 549 static void CompositorFrameDrawn(
550 const std::vector<ui::LatencyInfo>& latency_info); 550 const std::vector<ui::LatencyInfo>& latency_info);
551 551
552 // Don't check whether we expected a resize ack during layout tests. 552 // Don't check whether we expected a resize ack during layout tests.
553 static void DisableResizeAckCheckForTesting(); 553 static void DisableResizeAckCheckForTesting();
554 554
555 typedef base::Callback<void(const unsigned char*, size_t)>
556 WindowSnapshotCallback;
557 void RequestWindowSnapshot(const WindowSnapshotCallback&);
558
555 void WindowSnapshotAsyncCallback( 559 void WindowSnapshotAsyncCallback(
pfeldman 2014/03/07 12:21:22 TODO(kaznacheev): retire.
Vladislav Kaznacheev 2014/03/11 13:08:56 Done.
556 int routing_id, 560 int routing_id,
557 int snapshot_id, 561 int snapshot_id,
558 gfx::Size snapshot_size, 562 gfx::Size snapshot_size,
559 scoped_refptr<base::RefCountedBytes> png_data); 563 scoped_refptr<base::RefCountedBytes> png_data);
560 564
561 // LatencyComponents generated in the renderer must have component IDs 565 // LatencyComponents generated in the renderer must have component IDs
562 // provided to them by the browser process. This function adds the correct 566 // provided to them by the browser process. This function adds the correct
563 // component ID where necessary. 567 // component ID where necessary.
564 void AddLatencyInfoComponentIds(ui::LatencyInfo* latency_info); 568 void AddLatencyInfoComponentIds(ui::LatencyInfo* latency_info);
565 569
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event, 760 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event,
757 InputEventAckState ack_result) OVERRIDE; 761 InputEventAckState ack_result) OVERRIDE;
758 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE; 762 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE;
759 763
760 void OnSyntheticGestureCompleted(SyntheticGesture::Result result); 764 void OnSyntheticGestureCompleted(SyntheticGesture::Result result);
761 765
762 // Called when there is a new auto resize (using a post to avoid a stack 766 // Called when there is a new auto resize (using a post to avoid a stack
763 // which may get in recursive loops). 767 // which may get in recursive loops).
764 void DelayedAutoResized(); 768 void DelayedAutoResized();
765 769
770 // TODO(kaznacheev): Remove this method when GpuBenchmarking V8 extension is
771 // retired.
772 void WindowSnapshotReachedScreenUnsafe(int snapshot_id);
773
766 void WindowSnapshotReachedScreen(int snapshot_id); 774 void WindowSnapshotReachedScreen(int snapshot_id);
767 775
776 void OnSnapshotDataReceived(int snapshot_id,
777 const unsigned char* png,
778 size_t size);
779
780 void OnSnapshotDataReceivedAsync(
781 int snapshot_id,
782 scoped_refptr<base::RefCountedBytes> png_data);
783
768 // Send a message to the renderer process to change the accessibility mode. 784 // Send a message to the renderer process to change the accessibility mode.
769 void SetAccessibilityMode(AccessibilityMode AccessibilityMode); 785 void SetAccessibilityMode(AccessibilityMode AccessibilityMode);
770 786
771 // Our delegate, which wants to know mainly about keyboard events. 787 // Our delegate, which wants to know mainly about keyboard events.
772 // It will remain non-NULL until DetachDelegate() is called. 788 // It will remain non-NULL until DetachDelegate() is called.
773 RenderWidgetHostDelegate* delegate_; 789 RenderWidgetHostDelegate* delegate_;
774 790
775 // Created during construction but initialized during Init*(). Therefore, it 791 // Created during construction but initialized during Init*(). Therefore, it
776 // is guaranteed never to be NULL, but its channel may be NULL if the 792 // is guaranteed never to be NULL, but its channel may be NULL if the
777 // renderer crashed, so you must always check that. 793 // renderer crashed, so you must always check that.
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 951
936 #if defined(OS_WIN) 952 #if defined(OS_WIN)
937 std::list<HWND> dummy_windows_for_activation_; 953 std::list<HWND> dummy_windows_for_activation_;
938 #endif 954 #endif
939 955
940 // List of callbacks for pending snapshot requests to the renderer. 956 // List of callbacks for pending snapshot requests to the renderer.
941 std::queue<base::Callback<void(bool, const SkBitmap&)> > pending_snapshots_; 957 std::queue<base::Callback<void(bool, const SkBitmap&)> > pending_snapshots_;
942 958
943 int64 last_input_number_; 959 int64 last_input_number_;
944 960
961 int next_window_snapshot_id_;
962 typedef std::map<int, WindowSnapshotCallback> PendingSnapshotMap;
963 PendingSnapshotMap pending_window_snapshots_;
964
945 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 965 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
946 }; 966 };
947 967
948 } // namespace content 968 } // namespace content
949 969
950 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 970 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/devtools/renderer_overrides_handler.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698