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

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: Rebase Created 6 years, 7 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 virtual void WasResized() OVERRIDE; 166 virtual void WasResized() OVERRIDE;
167 virtual void AddKeyPressEventCallback( 167 virtual void AddKeyPressEventCallback(
168 const KeyPressEventCallback& callback) OVERRIDE; 168 const KeyPressEventCallback& callback) OVERRIDE;
169 virtual void RemoveKeyPressEventCallback( 169 virtual void RemoveKeyPressEventCallback(
170 const KeyPressEventCallback& callback) OVERRIDE; 170 const KeyPressEventCallback& callback) OVERRIDE;
171 virtual void AddMouseEventCallback( 171 virtual void AddMouseEventCallback(
172 const MouseEventCallback& callback) OVERRIDE; 172 const MouseEventCallback& callback) OVERRIDE;
173 virtual void RemoveMouseEventCallback( 173 virtual void RemoveMouseEventCallback(
174 const MouseEventCallback& callback) OVERRIDE; 174 const MouseEventCallback& callback) OVERRIDE;
175 virtual void GetWebScreenInfo(blink::WebScreenInfo* result) OVERRIDE; 175 virtual void GetWebScreenInfo(blink::WebScreenInfo* result) OVERRIDE;
176 virtual void GetSnapshotFromBrowser(
177 const base::Callback<void(const unsigned char*,size_t)> callback)
178 OVERRIDE;
176 179
177 virtual SkBitmap::Config PreferredReadbackFormat() OVERRIDE; 180 virtual SkBitmap::Config PreferredReadbackFormat() OVERRIDE;
178 181
179 // BrowserAccessibilityDelegate 182 // BrowserAccessibilityDelegate
180 virtual void AccessibilitySetFocus(int acc_obj_id) OVERRIDE; 183 virtual void AccessibilitySetFocus(int acc_obj_id) OVERRIDE;
181 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE; 184 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE;
182 virtual void AccessibilityShowMenu(int acc_obj_id) OVERRIDE; 185 virtual void AccessibilityShowMenu(int acc_obj_id) OVERRIDE;
183 virtual void AccessibilityScrollToMakeVisible( 186 virtual void AccessibilityScrollToMakeVisible(
184 int acc_obj_id, gfx::Rect subfocus) OVERRIDE; 187 int acc_obj_id, gfx::Rect subfocus) OVERRIDE;
185 virtual void AccessibilityScrollToPoint( 188 virtual void AccessibilityScrollToPoint(
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 // Returns the ID that uniquely describes this component to the latency 503 // Returns the ID that uniquely describes this component to the latency
501 // subsystem. 504 // subsystem.
502 int64 GetLatencyComponentId(); 505 int64 GetLatencyComponentId();
503 506
504 static void CompositorFrameDrawn( 507 static void CompositorFrameDrawn(
505 const std::vector<ui::LatencyInfo>& latency_info); 508 const std::vector<ui::LatencyInfo>& latency_info);
506 509
507 // Don't check whether we expected a resize ack during layout tests. 510 // Don't check whether we expected a resize ack during layout tests.
508 static void DisableResizeAckCheckForTesting(); 511 static void DisableResizeAckCheckForTesting();
509 512
510 void WindowSnapshotAsyncCallback(
511 int routing_id,
512 int snapshot_id,
513 gfx::Size snapshot_size,
514 scoped_refptr<base::RefCountedBytes> png_data);
515
516 // LatencyComponents generated in the renderer must have component IDs 513 // LatencyComponents generated in the renderer must have component IDs
517 // provided to them by the browser process. This function adds the correct 514 // provided to them by the browser process. This function adds the correct
518 // component ID where necessary. 515 // component ID where necessary.
519 void AddLatencyInfoComponentIds(ui::LatencyInfo* latency_info); 516 void AddLatencyInfoComponentIds(ui::LatencyInfo* latency_info);
520 517
521 InputRouter* input_router() { return input_router_.get(); } 518 InputRouter* input_router() { return input_router_.get(); }
522 519
523 protected: 520 protected:
524 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() OVERRIDE; 521 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() OVERRIDE;
525 522
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE; 697 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE;
701 698
702 void OnSyntheticGestureCompleted(SyntheticGesture::Result result); 699 void OnSyntheticGestureCompleted(SyntheticGesture::Result result);
703 700
704 // Called when there is a new auto resize (using a post to avoid a stack 701 // Called when there is a new auto resize (using a post to avoid a stack
705 // which may get in recursive loops). 702 // which may get in recursive loops).
706 void DelayedAutoResized(); 703 void DelayedAutoResized();
707 704
708 void WindowSnapshotReachedScreen(int snapshot_id); 705 void WindowSnapshotReachedScreen(int snapshot_id);
709 706
707 void OnSnapshotDataReceived(int snapshot_id,
708 const unsigned char* png,
709 size_t size);
710
711 void OnSnapshotDataReceivedAsync(
712 int snapshot_id,
713 scoped_refptr<base::RefCountedBytes> png_data);
714
710 // Send a message to the renderer process to change the accessibility mode. 715 // Send a message to the renderer process to change the accessibility mode.
711 void SetAccessibilityMode(AccessibilityMode AccessibilityMode); 716 void SetAccessibilityMode(AccessibilityMode AccessibilityMode);
712 717
713 // Our delegate, which wants to know mainly about keyboard events. 718 // Our delegate, which wants to know mainly about keyboard events.
714 // It will remain non-NULL until DetachDelegate() is called. 719 // It will remain non-NULL until DetachDelegate() is called.
715 RenderWidgetHostDelegate* delegate_; 720 RenderWidgetHostDelegate* delegate_;
716 721
717 // Created during construction but initialized during Init*(). Therefore, it 722 // Created during construction but initialized during Init*(). Therefore, it
718 // is guaranteed never to be NULL, but its channel may be NULL if the 723 // is guaranteed never to be NULL, but its channel may be NULL if the
719 // renderer crashed, so you must always check that. 724 // renderer crashed, so you must always check that.
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 scoped_ptr<OverscrollController> overscroll_controller_; 874 scoped_ptr<OverscrollController> overscroll_controller_;
870 875
871 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_; 876 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_;
872 877
873 #if defined(OS_WIN) 878 #if defined(OS_WIN)
874 std::list<HWND> dummy_windows_for_activation_; 879 std::list<HWND> dummy_windows_for_activation_;
875 #endif 880 #endif
876 881
877 int64 last_input_number_; 882 int64 last_input_number_;
878 883
884 int next_browser_snapshot_id_;
885 typedef std::map<int,
886 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap;
887 PendingSnapshotMap pending_browser_snapshots_;
888
879 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 889 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
880 }; 890 };
881 891
882 } // namespace content 892 } // namespace content
883 893
884 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 894 #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