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

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

Issue 18768: POSIX: gfx::NativeViewId and CrossProcessEvent (Closed)
Patch Set: Addressing Brett's comments Created 11 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
« no previous file with comments | « chrome/renderer/render_thread.h ('k') | chrome/renderer/render_view.h » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <windows.h> 5 #include <windows.h>
6 #include <algorithm> 6 #include <algorithm>
7 7
8 #include "chrome/renderer/render_thread.h" 8 #include "chrome/renderer/render_thread.h"
9 9
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 chrome_plugin->functions().on_message(data_ptr, data_len); 188 chrome_plugin->functions().on_message(data_ptr, data_len);
189 } 189 }
190 } 190 }
191 191
192 void RenderThread::OnSetNextPageID(int32 next_page_id) { 192 void RenderThread::OnSetNextPageID(int32 next_page_id) {
193 // This should only be called at process initialization time, so we shouldn't 193 // This should only be called at process initialization time, so we shouldn't
194 // have to worry about thread-safety. 194 // have to worry about thread-safety.
195 RenderView::SetNextPageID(next_page_id); 195 RenderView::SetNextPageID(next_page_id);
196 } 196 }
197 197
198 void RenderThread::OnCreateNewView(HWND parent_hwnd, 198 void RenderThread::OnCreateNewView(gfx::NativeViewId parent_hwnd,
199 HANDLE modal_dialog_event, 199 ModalDialogEvent modal_dialog_event,
200 const WebPreferences& webkit_prefs, 200 const WebPreferences& webkit_prefs,
201 int32 view_id) { 201 int32 view_id) {
202 base::WaitableEvent* waitable_event = new base::WaitableEvent(
203 #if defined(OS_WIN)
204 modal_dialog_event.event);
205 #else
206 true, false);
207 #endif
208
202 // TODO(darin): once we have a RenderThread per RenderView, this will need to 209 // TODO(darin): once we have a RenderThread per RenderView, this will need to
203 // change to assert that we are not creating more than one view. 210 // change to assert that we are not creating more than one view.
204 base::WaitableEvent* waitable_event =
205 new base::WaitableEvent(modal_dialog_event);
206 RenderView::Create( 211 RenderView::Create(
207 this, parent_hwnd, waitable_event, MSG_ROUTING_NONE, webkit_prefs, 212 this, parent_hwnd, waitable_event, MSG_ROUTING_NONE, webkit_prefs,
208 new SharedRenderViewCounter(0), view_id); 213 new SharedRenderViewCounter(0), view_id);
209 } 214 }
210 215
211 void RenderThread::OnSetCacheCapacities(size_t min_dead_capacity, 216 void RenderThread::OnSetCacheCapacities(size_t min_dead_capacity,
212 size_t max_dead_capacity, 217 size_t max_dead_capacity,
213 size_t capacity) { 218 size_t capacity) {
214 CacheManager::SetCapacities(min_dead_capacity, max_dead_capacity, capacity); 219 CacheManager::SetCapacities(min_dead_capacity, max_dead_capacity, capacity);
215 } 220 }
(...skipping 13 matching lines...) Expand all
229 void RenderThread::InformHostOfCacheStatsLater() { 234 void RenderThread::InformHostOfCacheStatsLater() {
230 // Rate limit informing the host of our cache stats. 235 // Rate limit informing the host of our cache stats.
231 if (!cache_stats_factory_->empty()) 236 if (!cache_stats_factory_->empty())
232 return; 237 return;
233 238
234 MessageLoop::current()->PostDelayedTask(FROM_HERE, 239 MessageLoop::current()->PostDelayedTask(FROM_HERE,
235 cache_stats_factory_->NewRunnableMethod( 240 cache_stats_factory_->NewRunnableMethod(
236 &RenderThread::InformHostOfCacheStats), 241 &RenderThread::InformHostOfCacheStats),
237 kCacheStatsDelayMS); 242 kCacheStatsDelayMS);
238 } 243 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_thread.h ('k') | chrome/renderer/render_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698