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

Side by Side Diff: chrome/renderer/render_widget.cc

Issue 1095005: Fixed bugs in GPU process startup on POSIX platforms. Added... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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
« chrome/gpu/gpu_main.cc ('K') | « chrome/gpu/gpu_main.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/renderer/render_widget.h" 5 #include "chrome/renderer/render_widget.h"
6 6
7 #include "app/surface/transport_dib.h" 7 #include "app/surface/transport_dib.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/scoped_ptr.h" 11 #include "base/scoped_ptr.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "chrome/common/chrome_switches.h" 13 #include "chrome/common/chrome_switches.h"
14 #include "chrome/common/render_messages.h" 14 #include "chrome/common/render_messages.h"
15 #include "chrome/renderer/render_process.h" 15 #include "chrome/renderer/render_process.h"
16 #include "chrome/renderer/render_thread.h" 16 #include "chrome/renderer/render_thread.h"
17 #include "gfx/point.h" 17 #include "gfx/point.h"
18 #include "gfx/size.h" 18 #include "gfx/size.h"
19 #include "skia/ext/platform_canvas.h" 19 #include "skia/ext/platform_canvas.h"
20 #include "third_party/skia/include/core/SkShader.h" 20 #include "third_party/skia/include/core/SkShader.h"
21 #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" 21 #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h"
22 #include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h" 22 #include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h"
23 #include "third_party/WebKit/WebKit/chromium/public/WebPopupMenuInfo.h" 23 #include "third_party/WebKit/WebKit/chromium/public/WebPopupMenuInfo.h"
24 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h" 24 #include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
25 #include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h" 25 #include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h"
26 #include "third_party/WebKit/WebKit/chromium/public/WebSize.h" 26 #include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
27 #include "webkit/glue/webkit_glue.h" 27 #include "webkit/glue/webkit_glue.h"
28 28
29 #if defined(OS_POSIX) 29 #if defined(OS_POSIX)
30 #include "ipc/ipc_channel_posix.h"
30 #include "third_party/skia/include/core/SkPixelRef.h" 31 #include "third_party/skia/include/core/SkPixelRef.h"
31 #include "third_party/skia/include/core/SkMallocPixelRef.h" 32 #include "third_party/skia/include/core/SkMallocPixelRef.h"
32 #endif // defined(OS_POSIX) 33 #endif // defined(OS_POSIX)
33 34
34 #include "third_party/WebKit/WebKit/chromium/public/WebWidget.h" 35 #include "third_party/WebKit/WebKit/chromium/public/WebWidget.h"
35 36
36 using WebKit::WebCompositionCommand; 37 using WebKit::WebCompositionCommand;
37 using WebKit::WebCursorInfo; 38 using WebKit::WebCursorInfo;
38 using WebKit::WebInputEvent; 39 using WebKit::WebInputEvent;
39 using WebKit::WebNavigationPolicy; 40 using WebKit::WebNavigationPolicy;
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 } 727 }
727 728
728 void RenderWidget::OnSetTextDirection(WebTextDirection direction) { 729 void RenderWidget::OnSetTextDirection(WebTextDirection direction) {
729 if (!webwidget_) 730 if (!webwidget_)
730 return; 731 return;
731 webwidget_->setTextDirection(direction); 732 webwidget_->setTextDirection(direction);
732 } 733 }
733 734
734 void RenderWidget::OnGpuChannelEstablished( 735 void RenderWidget::OnGpuChannelEstablished(
735 const IPC::ChannelHandle& channel_handle) { 736 const IPC::ChannelHandle& channel_handle) {
737 #if defined(OS_POSIX)
738 // If we received a ChannelHandle, register it now.
739 if (channel_handle.socket.fd >= 0)
740 IPC::AddChannelSocket(channel_handle.name, channel_handle.socket.fd);
741 #endif
742
736 if (channel_handle.name.size() != 0) { 743 if (channel_handle.name.size() != 0) {
737 // Connect to the GPU process if a channel name was received. 744 // Connect to the GPU process if a channel name was received.
738 gpu_channel_->Connect(channel_handle.name); 745 gpu_channel_->Connect(channel_handle.name);
739 } else { 746 } else {
740 // Otherwise cancel the connection. 747 // Otherwise cancel the connection.
741 gpu_channel_ = NULL; 748 gpu_channel_ = NULL;
742 } 749 }
743 } 750 }
744 751
745 void RenderWidget::SetHidden(bool hidden) { 752 void RenderWidget::SetHidden(bool hidden) {
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 GpuChannelHost* RenderWidget::GetGpuChannel() { 913 GpuChannelHost* RenderWidget::GetGpuChannel() {
907 if (!gpu_channel_.get()) 914 if (!gpu_channel_.get())
908 return NULL; 915 return NULL;
909 916
910 if (gpu_channel_->state() != GpuChannelHost::CONNECTED) 917 if (gpu_channel_->state() != GpuChannelHost::CONNECTED)
911 return NULL; 918 return NULL;
912 919
913 return gpu_channel_.get(); 920 return gpu_channel_.get();
914 } 921 }
915 922
OLDNEW
« chrome/gpu/gpu_main.cc ('K') | « chrome/gpu/gpu_main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698