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

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

Issue 311313003: DevTools: Fix for Page.captureScreenshot (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for mac (again) Created 6 years, 6 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
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 virtual void WasResized() OVERRIDE; 165 virtual void WasResized() OVERRIDE;
166 virtual void AddKeyPressEventCallback( 166 virtual void AddKeyPressEventCallback(
167 const KeyPressEventCallback& callback) OVERRIDE; 167 const KeyPressEventCallback& callback) OVERRIDE;
168 virtual void RemoveKeyPressEventCallback( 168 virtual void RemoveKeyPressEventCallback(
169 const KeyPressEventCallback& callback) OVERRIDE; 169 const KeyPressEventCallback& callback) OVERRIDE;
170 virtual void AddMouseEventCallback( 170 virtual void AddMouseEventCallback(
171 const MouseEventCallback& callback) OVERRIDE; 171 const MouseEventCallback& callback) OVERRIDE;
172 virtual void RemoveMouseEventCallback( 172 virtual void RemoveMouseEventCallback(
173 const MouseEventCallback& callback) OVERRIDE; 173 const MouseEventCallback& callback) OVERRIDE;
174 virtual void GetWebScreenInfo(blink::WebScreenInfo* result) OVERRIDE; 174 virtual void GetWebScreenInfo(blink::WebScreenInfo* result) OVERRIDE;
175 virtual void GetSnapshotFromBrowser(
176 const base::Callback<void(const unsigned char*,size_t)> callback)
177 OVERRIDE;
175 178
176 virtual SkBitmap::Config PreferredReadbackFormat() OVERRIDE; 179 virtual SkBitmap::Config PreferredReadbackFormat() OVERRIDE;
177 180
178 // BrowserAccessibilityDelegate 181 // BrowserAccessibilityDelegate
179 virtual void AccessibilitySetFocus(int acc_obj_id) OVERRIDE; 182 virtual void AccessibilitySetFocus(int acc_obj_id) OVERRIDE;
180 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE; 183 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE;
181 virtual void AccessibilityShowMenu(int acc_obj_id) OVERRIDE; 184 virtual void AccessibilityShowMenu(int acc_obj_id) OVERRIDE;
182 virtual void AccessibilityScrollToMakeVisible( 185 virtual void AccessibilityScrollToMakeVisible(
183 int acc_obj_id, gfx::Rect subfocus) OVERRIDE; 186 int acc_obj_id, gfx::Rect subfocus) OVERRIDE;
184 virtual void AccessibilityScrollToPoint( 187 virtual void AccessibilityScrollToPoint(
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event, 689 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event,
687 InputEventAckState ack_result) OVERRIDE; 690 InputEventAckState ack_result) OVERRIDE;
688 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE; 691 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE;
689 692
690 void OnSyntheticGestureCompleted(SyntheticGesture::Result result); 693 void OnSyntheticGestureCompleted(SyntheticGesture::Result result);
691 694
692 // Called when there is a new auto resize (using a post to avoid a stack 695 // Called when there is a new auto resize (using a post to avoid a stack
693 // which may get in recursive loops). 696 // which may get in recursive loops).
694 void DelayedAutoResized(); 697 void DelayedAutoResized();
695 698
699 void WindowOldSnapshotReachedScreen(int snapshot_id);
700
696 void WindowSnapshotReachedScreen(int snapshot_id); 701 void WindowSnapshotReachedScreen(int snapshot_id);
697 702
703 void OnSnapshotDataReceived(int snapshot_id,
704 const unsigned char* png,
705 size_t size);
706
707 void OnSnapshotDataReceivedAsync(
708 int snapshot_id,
709 scoped_refptr<base::RefCountedBytes> png_data);
710
698 // Send a message to the renderer process to change the accessibility mode. 711 // Send a message to the renderer process to change the accessibility mode.
699 void SetAccessibilityMode(AccessibilityMode AccessibilityMode); 712 void SetAccessibilityMode(AccessibilityMode AccessibilityMode);
700 713
701 // Our delegate, which wants to know mainly about keyboard events. 714 // Our delegate, which wants to know mainly about keyboard events.
702 // It will remain non-NULL until DetachDelegate() is called. 715 // It will remain non-NULL until DetachDelegate() is called.
703 RenderWidgetHostDelegate* delegate_; 716 RenderWidgetHostDelegate* delegate_;
704 717
705 // Created during construction but initialized during Init*(). Therefore, it 718 // Created during construction but initialized during Init*(). Therefore, it
706 // is guaranteed never to be NULL, but its channel may be NULL if the 719 // is guaranteed never to be NULL, but its channel may be NULL if the
707 // renderer crashed, so you must always check that. 720 // renderer crashed, so you must always check that.
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 scoped_ptr<InputRouter> input_router_; 868 scoped_ptr<InputRouter> input_router_;
856 869
857 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_; 870 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_;
858 871
859 #if defined(OS_WIN) 872 #if defined(OS_WIN)
860 std::list<HWND> dummy_windows_for_activation_; 873 std::list<HWND> dummy_windows_for_activation_;
861 #endif 874 #endif
862 875
863 int64 last_input_number_; 876 int64 last_input_number_;
864 877
878 int next_browser_snapshot_id_;
879 typedef std::map<int,
880 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap;
881 PendingSnapshotMap pending_browser_snapshots_;
882
865 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 883 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
866 }; 884 };
867 885
868 } // namespace content 886 } // namespace content
869 887
870 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 888 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698