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

Side by Side Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 6386009: Remove app/win/win_util.h,cc etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code cleanup Created 9 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "chrome/browser/renderer_host/browser_render_process_host.h" 8 #include "chrome/browser/renderer_host/browser_render_process_host.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 #include "ipc/ipc_message.h" 92 #include "ipc/ipc_message.h"
93 #include "ipc/ipc_platform_file.h" 93 #include "ipc/ipc_platform_file.h"
94 #include "ipc/ipc_switches.h" 94 #include "ipc/ipc_switches.h"
95 #include "media/base/media_switches.h" 95 #include "media/base/media_switches.h"
96 #include "ui/base/ui_base_switches.h" 96 #include "ui/base/ui_base_switches.h"
97 #include "webkit/fileapi/file_system_path_manager.h" 97 #include "webkit/fileapi/file_system_path_manager.h"
98 #include "webkit/plugins/plugin_switches.h" 98 #include "webkit/plugins/plugin_switches.h"
99 99
100 #if defined(OS_WIN) 100 #if defined(OS_WIN)
101 #include <objbase.h> 101 #include <objbase.h>
102 #include "app/win/win_util.h" 102 #include "chrome/common/section_util_win.h"
103 #endif 103 #endif
104 104
105 using WebKit::WebCache; 105 using WebKit::WebCache;
106 106
107 #include "third_party/skia/include/core/SkBitmap.h" 107 #include "third_party/skia/include/core/SkBitmap.h"
108 108
109 // TODO(mpcomplete): Remove this after fixing 109 // TODO(mpcomplete): Remove this after fixing
110 // http://code.google.com/p/chromium/issues/detail?id=53991 110 // http://code.google.com/p/chromium/issues/detail?id=53991
111 bool g_log_bug53991 = false; 111 bool g_log_bug53991 = false;
112 112
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 return false; 877 return false;
878 } 878 }
879 return channel_->SendWithTimeout(msg, timeout_ms); 879 return channel_->SendWithTimeout(msg, timeout_ms);
880 } 880 }
881 881
882 // This is a platform specific function for mapping a transport DIB given its id 882 // This is a platform specific function for mapping a transport DIB given its id
883 TransportDIB* BrowserRenderProcessHost::MapTransportDIB( 883 TransportDIB* BrowserRenderProcessHost::MapTransportDIB(
884 TransportDIB::Id dib_id) { 884 TransportDIB::Id dib_id) {
885 #if defined(OS_WIN) 885 #if defined(OS_WIN)
886 // On Windows we need to duplicate the handle from the remote process 886 // On Windows we need to duplicate the handle from the remote process
887 HANDLE section = app::win::GetSectionFromProcess( 887 HANDLE section = chrome::GetSectionFromProcess(
888 dib_id.handle, GetHandle(), false /* read write */); 888 dib_id.handle, GetHandle(), false /* read write */);
889 return TransportDIB::Map(section); 889 return TransportDIB::Map(section);
890 #elif defined(OS_MACOSX) 890 #elif defined(OS_MACOSX)
891 // On OSX, the browser allocates all DIBs and keeps a file descriptor around 891 // On OSX, the browser allocates all DIBs and keeps a file descriptor around
892 // for each. 892 // for each.
893 return widget_helper_->MapTransportDIB(dib_id); 893 return widget_helper_->MapTransportDIB(dib_id);
894 #elif defined(OS_POSIX) 894 #elif defined(OS_POSIX)
895 return TransportDIB::Map(dib_id); 895 return TransportDIB::Map(dib_id);
896 #endif // defined(OS_POSIX) 896 #endif // defined(OS_POSIX)
897 } 897 }
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 IPC::PlatformFileForTransit file; 1278 IPC::PlatformFileForTransit file;
1279 #if defined(OS_POSIX) 1279 #if defined(OS_POSIX)
1280 file = base::FileDescriptor(model_file, false); 1280 file = base::FileDescriptor(model_file, false);
1281 #elif defined(OS_WIN) 1281 #elif defined(OS_WIN)
1282 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, 1282 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0,
1283 false, DUPLICATE_SAME_ACCESS); 1283 false, DUPLICATE_SAME_ACCESS);
1284 #endif 1284 #endif
1285 Send(new ViewMsg_SetPhishingModel(file)); 1285 Send(new ViewMsg_SetPhishingModel(file));
1286 } 1286 }
1287 } 1287 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698