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

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

Issue 12881005: Allow CopyFromBackingStore to fallback to copying from the renderer side if the accelerated surface… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unused include Created 7 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
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>
11 #include <queue> 11 #include <queue>
12 #include <string> 12 #include <string>
13 #include <utility>
13 #include <vector> 14 #include <vector>
14 15
15 #include "base/callback.h" 16 #include "base/callback.h"
16 #include "base/gtest_prod_util.h" 17 #include "base/gtest_prod_util.h"
17 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
18 #include "base/memory/weak_ptr.h" 19 #include "base/memory/weak_ptr.h"
19 #include "base/process_util.h" 20 #include "base/process_util.h"
20 #include "base/string16.h" 21 #include "base/string16.h"
21 #include "base/time.h" 22 #include "base/time.h"
22 #include "base/timer.h" 23 #include "base/timer.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 virtual void Replace(const string16& word) OVERRIDE; 140 virtual void Replace(const string16& word) OVERRIDE;
140 virtual void ReplaceMisspelling(const string16& word) OVERRIDE; 141 virtual void ReplaceMisspelling(const string16& word) OVERRIDE;
141 virtual void ResizeRectChanged(const gfx::Rect& new_rect) OVERRIDE; 142 virtual void ResizeRectChanged(const gfx::Rect& new_rect) OVERRIDE;
142 virtual void RestartHangMonitorTimeout() OVERRIDE; 143 virtual void RestartHangMonitorTimeout() OVERRIDE;
143 virtual void SetIgnoreInputEvents(bool ignore_input_events) OVERRIDE; 144 virtual void SetIgnoreInputEvents(bool ignore_input_events) OVERRIDE;
144 virtual void Stop() OVERRIDE; 145 virtual void Stop() OVERRIDE;
145 virtual void WasResized() OVERRIDE; 146 virtual void WasResized() OVERRIDE;
146 virtual void AddKeyboardListener(KeyboardListener* listener) OVERRIDE; 147 virtual void AddKeyboardListener(KeyboardListener* listener) OVERRIDE;
147 virtual void RemoveKeyboardListener(KeyboardListener* listener) OVERRIDE; 148 virtual void RemoveKeyboardListener(KeyboardListener* listener) OVERRIDE;
148 virtual void GetWebScreenInfo(WebKit::WebScreenInfo* result) OVERRIDE; 149 virtual void GetWebScreenInfo(WebKit::WebScreenInfo* result) OVERRIDE;
150 virtual void GetSnapshotFromRenderer(
151 const gfx::Rect& src_subrect,
152 const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE;
149 153
150 // Notification that the screen info has changed. 154 // Notification that the screen info has changed.
151 void NotifyScreenInfoChanged(); 155 void NotifyScreenInfoChanged();
152 156
153 // Sets the View of this RenderWidgetHost. 157 // Sets the View of this RenderWidgetHost.
154 void SetView(RenderWidgetHostView* view); 158 void SetView(RenderWidgetHostView* view);
155 159
156 int surface_id() const { return surface_id_; } 160 int surface_id() const { return surface_id_; }
157 161
158 bool empty() const { return current_size_.IsEmpty(); } 162 bool empty() const { return current_size_.IsEmpty(); }
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 void OnUnlockMouse(); 599 void OnUnlockMouse();
596 void OnShowDisambiguationPopup(const gfx::Rect& rect, 600 void OnShowDisambiguationPopup(const gfx::Rect& rect,
597 const gfx::Size& size, 601 const gfx::Size& size,
598 const TransportDIB::Id& id); 602 const TransportDIB::Id& id);
599 #if defined(OS_WIN) 603 #if defined(OS_WIN)
600 void OnWindowlessPluginDummyWindowCreated( 604 void OnWindowlessPluginDummyWindowCreated(
601 gfx::NativeViewId dummy_activation_window); 605 gfx::NativeViewId dummy_activation_window);
602 void OnWindowlessPluginDummyWindowDestroyed( 606 void OnWindowlessPluginDummyWindowDestroyed(
603 gfx::NativeViewId dummy_activation_window); 607 gfx::NativeViewId dummy_activation_window);
604 #endif 608 #endif
609 void OnSnapshot(bool success, const SkBitmap& bitmap);
605 610
606 // Called (either immediately or asynchronously) after we're done with our 611 // Called (either immediately or asynchronously) after we're done with our
607 // BackingStore and can send an ACK to the renderer so it can paint onto it 612 // BackingStore and can send an ACK to the renderer so it can paint onto it
608 // again. 613 // again.
609 void DidUpdateBackingStore(const ViewHostMsg_UpdateRect_Params& params, 614 void DidUpdateBackingStore(const ViewHostMsg_UpdateRect_Params& params,
610 const base::TimeTicks& paint_start); 615 const base::TimeTicks& paint_start);
611 616
612 // Paints the given bitmap to the current backing store at the given 617 // Paints the given bitmap to the current backing store at the given
613 // location. Returns true if the passed callback was asynchronously 618 // location. Returns true if the passed callback was asynchronously
614 // scheduled in the future (and thus the caller must manually synchronously 619 // scheduled in the future (and thus the caller must manually synchronously
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 bool tick_active_smooth_scroll_gestures_task_posted_; 859 bool tick_active_smooth_scroll_gestures_task_posted_;
855 860
856 scoped_ptr<TouchEventQueue> touch_event_queue_; 861 scoped_ptr<TouchEventQueue> touch_event_queue_;
857 scoped_ptr<GestureEventFilter> gesture_event_filter_; 862 scoped_ptr<GestureEventFilter> gesture_event_filter_;
858 scoped_ptr<OverscrollController> overscroll_controller_; 863 scoped_ptr<OverscrollController> overscroll_controller_;
859 864
860 #if defined(OS_WIN) 865 #if defined(OS_WIN)
861 std::list<HWND> dummy_windows_for_activation_; 866 std::list<HWND> dummy_windows_for_activation_;
862 #endif 867 #endif
863 868
869 // List of callbacks for pending snapshot requests to the renderer.
870 std::queue<base::Callback<void(bool, const SkBitmap&)> > pending_snapshots_;
871
864 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 872 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
865 }; 873 };
866 874
867 } // namespace content 875 } // namespace content
868 876
869 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 877 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698