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

Side by Side Diff: content/browser/renderer_host/render_widget_host.cc

Issue 9420007: Move RenderWidgetHostView into content namespace. Fix include paths. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux_chromeos_gtk build issue not caught by trybots. Created 8 years, 10 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 #include "content/browser/renderer_host/render_widget_host.h" 5 #include "content/browser/renderer_host/render_widget_host.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
11 #include "base/i18n/rtl.h" 11 #include "base/i18n/rtl.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/string_number_conversions.h" 14 #include "base/string_number_conversions.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "content/browser/accessibility/browser_accessibility_state.h" 16 #include "content/browser/accessibility/browser_accessibility_state.h"
17 #include "content/browser/gpu/gpu_process_host.h" 17 #include "content/browser/gpu/gpu_process_host.h"
18 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 18 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
19 #include "content/browser/gpu/gpu_surface_tracker.h" 19 #include "content/browser/gpu/gpu_surface_tracker.h"
20 #include "content/browser/renderer_host/backing_store.h" 20 #include "content/browser/renderer_host/backing_store.h"
21 #include "content/browser/renderer_host/backing_store_manager.h" 21 #include "content/browser/renderer_host/backing_store_manager.h"
22 #include "content/browser/renderer_host/render_process_host_impl.h" 22 #include "content/browser/renderer_host/render_process_host_impl.h"
23 #include "content/browser/renderer_host/render_widget_helper.h" 23 #include "content/browser/renderer_host/render_widget_helper.h"
24 #include "content/browser/renderer_host/render_widget_host_view.h"
25 #include "content/common/accessibility_messages.h" 24 #include "content/common/accessibility_messages.h"
26 #include "content/common/gpu/gpu_messages.h" 25 #include "content/common/gpu/gpu_messages.h"
27 #include "content/common/view_messages.h" 26 #include "content/common/view_messages.h"
27 #include "content/port/browser/render_widget_host_view_port.h"
28 #include "content/public/browser/native_web_keyboard_event.h" 28 #include "content/public/browser/native_web_keyboard_event.h"
29 #include "content/public/browser/notification_service.h" 29 #include "content/public/browser/notification_service.h"
30 #include "content/public/browser/notification_types.h" 30 #include "content/public/browser/notification_types.h"
31 #include "content/public/browser/user_metrics.h" 31 #include "content/public/browser/user_metrics.h"
32 #include "content/public/common/content_switches.h" 32 #include "content/public/common/content_switches.h"
33 #include "content/public/common/result_codes.h" 33 #include "content/public/common/result_codes.h"
34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h" 34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h"
35 #include "ui/base/keycodes/keyboard_codes.h" 35 #include "ui/base/keycodes/keyboard_codes.h"
36 #include "webkit/glue/webcursor.h" 36 #include "webkit/glue/webcursor.h"
37 #include "webkit/glue/webpreferences.h" 37 #include "webkit/glue/webpreferences.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 // Clear our current or cached backing store if either remains. 147 // Clear our current or cached backing store if either remains.
148 BackingStoreManager::RemoveBackingStore(this); 148 BackingStoreManager::RemoveBackingStore(this);
149 149
150 GpuSurfaceTracker::Get()->RemoveSurface(surface_id_); 150 GpuSurfaceTracker::Get()->RemoveSurface(surface_id_);
151 surface_id_ = 0; 151 surface_id_ = 0;
152 152
153 process_->Release(routing_id_); 153 process_->Release(routing_id_);
154 } 154 }
155 155
156 void RenderWidgetHost::SetView(RenderWidgetHostView* view) { 156 void RenderWidgetHost::SetView(content::RenderWidgetHostView* view) {
157 view_ = RenderWidgetHostViewPort::FromRWHV(view); 157 view_ = RenderWidgetHostViewPort::FromRWHV(view);
158 158
159 if (!view_) { 159 if (!view_) {
160 GpuSurfaceTracker::Get()->SetSurfaceHandle( 160 GpuSurfaceTracker::Get()->SetSurfaceHandle(
161 surface_id_, gfx::GLSurfaceHandle()); 161 surface_id_, gfx::GLSurfaceHandle());
162 } 162 }
163 } 163 }
164 164
165 RenderWidgetHostView* RenderWidgetHost::view() const { 165 content::RenderWidgetHostView* RenderWidgetHost::view() const {
166 return view_; 166 return view_;
167 } 167 }
168 168
169 gfx::NativeViewId RenderWidgetHost::GetNativeViewId() const { 169 gfx::NativeViewId RenderWidgetHost::GetNativeViewId() const {
170 if (view_) 170 if (view_)
171 return view_->GetNativeViewId(); 171 return view_->GetNativeViewId();
172 return 0; 172 return 0;
173 } 173 }
174 174
175 gfx::GLSurfaceHandle RenderWidgetHost::GetCompositingSurface() { 175 gfx::GLSurfaceHandle RenderWidgetHost::GetCompositingSurface() {
(...skipping 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 ui_shim->Send(new AcceleratedSurfaceMsg_BuffersSwappedACK(route_id)); 1549 ui_shim->Send(new AcceleratedSurfaceMsg_BuffersSwappedACK(route_id));
1550 } 1550 }
1551 1551
1552 // static 1552 // static
1553 void RenderWidgetHost::AcknowledgePostSubBuffer(int32 route_id, 1553 void RenderWidgetHost::AcknowledgePostSubBuffer(int32 route_id,
1554 int gpu_host_id) { 1554 int gpu_host_id) {
1555 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); 1555 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id);
1556 if (ui_shim) 1556 if (ui_shim)
1557 ui_shim->Send(new AcceleratedSurfaceMsg_PostSubBufferACK(route_id)); 1557 ui_shim->Send(new AcceleratedSurfaceMsg_PostSubBufferACK(route_id));
1558 } 1558 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host.h ('k') | content/browser/renderer_host/render_widget_host_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698