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

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

Issue 8760011: Move the ProcessType enum out to its own file. This is in preparation for getting rid of ChildPro... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 9 years 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 #include "content/browser/renderer_host/render_widget_host_view_win.h" 5 #include "content/browser/renderer_host/render_widget_host_view_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 20 matching lines...) Expand all
31 #include "content/common/gpu/gpu_messages.h" 31 #include "content/common/gpu/gpu_messages.h"
32 #include "content/common/plugin_messages.h" 32 #include "content/common/plugin_messages.h"
33 #include "content/common/view_messages.h" 33 #include "content/common/view_messages.h"
34 #include "content/public/browser/browser_thread.h" 34 #include "content/public/browser/browser_thread.h"
35 #include "content/public/browser/content_browser_client.h" 35 #include "content/public/browser/content_browser_client.h"
36 #include "content/public/browser/native_web_keyboard_event.h" 36 #include "content/public/browser/native_web_keyboard_event.h"
37 #include "content/public/browser/notification_service.h" 37 #include "content/public/browser/notification_service.h"
38 #include "content/public/browser/notification_types.h" 38 #include "content/public/browser/notification_types.h"
39 #include "content/public/common/content_switches.h" 39 #include "content/public/common/content_switches.h"
40 #include "content/public/common/page_zoom.h" 40 #include "content/public/common/page_zoom.h"
41 #include "content/public/common/process_type.h"
41 #include "skia/ext/skia_utils_win.h" 42 #include "skia/ext/skia_utils_win.h"
42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h" 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h"
43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
44 #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebInputEventFact ory.h" 45 #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebInputEventFact ory.h"
45 #include "ui/base/ime/composition_text.h" 46 #include "ui/base/ime/composition_text.h"
46 #include "ui/base/l10n/l10n_util_win.h" 47 #include "ui/base/l10n/l10n_util_win.h"
47 #include "ui/base/text/text_elider.h" 48 #include "ui/base/text/text_elider.h"
48 #include "ui/base/view_prop.h" 49 #include "ui/base/view_prop.h"
49 #include "ui/base/win/hwnd_util.h" 50 #include "ui/base/win/hwnd_util.h"
50 #include "ui/base/win/mouse_wheel_util.h" 51 #include "ui/base/win/mouse_wheel_util.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 105
105 // |window| is the plugin HWND, created and destroyed in the plugin process. 106 // |window| is the plugin HWND, created and destroyed in the plugin process.
106 // |parent| is the parent HWND, created and destroyed on the browser UI thread. 107 // |parent| is the parent HWND, created and destroyed on the browser UI thread.
107 void NotifyPluginProcessHostHelper(HWND window, HWND parent, int tries) { 108 void NotifyPluginProcessHostHelper(HWND window, HWND parent, int tries) {
108 // How long to wait between each try. 109 // How long to wait between each try.
109 static const int kTryDelayMs = 200; 110 static const int kTryDelayMs = 200;
110 111
111 DWORD plugin_process_id; 112 DWORD plugin_process_id;
112 bool found_starting_plugin_process = false; 113 bool found_starting_plugin_process = false;
113 GetWindowThreadProcessId(window, &plugin_process_id); 114 GetWindowThreadProcessId(window, &plugin_process_id);
114 for (BrowserChildProcessHost::Iterator iter(ChildProcessInfo::PLUGIN_PROCESS); 115 for (BrowserChildProcessHost::Iterator iter(content::PROCESS_TYPE_PLUGIN);
115 !iter.Done(); ++iter) { 116 !iter.Done(); ++iter) {
116 PluginProcessHost* plugin = static_cast<PluginProcessHost*>(*iter); 117 PluginProcessHost* plugin = static_cast<PluginProcessHost*>(*iter);
117 if (!plugin->handle()) { 118 if (!plugin->handle()) {
118 found_starting_plugin_process = true; 119 found_starting_plugin_process = true;
119 continue; 120 continue;
120 } 121 }
121 if (base::GetProcId(plugin->handle()) == plugin_process_id) { 122 if (base::GetProcId(plugin->handle()) == plugin_process_id) {
122 plugin->AddWindow(parent); 123 plugin->AddWindow(parent);
123 return; 124 return;
124 } 125 }
(...skipping 2354 matching lines...) Expand 10 before | Expand all | Expand 10 after
2479 2480
2480 size_t offset = selection_range_.GetMin() - selection_text_offset_; 2481 size_t offset = selection_range_.GetMin() - selection_text_offset_;
2481 memcpy(reinterpret_cast<char*>(reconv) + sizeof(RECONVERTSTRING), 2482 memcpy(reinterpret_cast<char*>(reconv) + sizeof(RECONVERTSTRING),
2482 selection_text_.c_str() + offset, len * sizeof(WCHAR)); 2483 selection_text_.c_str() + offset, len * sizeof(WCHAR));
2483 2484
2484 // According to Microsft API document, IMR_RECONVERTSTRING and 2485 // According to Microsft API document, IMR_RECONVERTSTRING and
2485 // IMR_DOCUMENTFEED should return reconv, but some applications return 2486 // IMR_DOCUMENTFEED should return reconv, but some applications return
2486 // need_size. 2487 // need_size.
2487 return reinterpret_cast<LRESULT>(reconv); 2488 return reinterpret_cast<LRESULT>(reconv);
2488 } 2489 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/browser/renderer_host/resource_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698