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

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

Issue 342068: Third patch in getting rid of caching MessageLoop pointers and always using C... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/browser/renderer_host/render_widget_host_view_win.h" 5 #include "chrome/browser/renderer_host/render_widget_host_view_win.h"
6 6
7 #include "app/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/gfx/gdi_util.h" 8 #include "app/gfx/gdi_util.h"
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/l10n_util_win.h" 10 #include "app/l10n_util_win.h"
11 #include "app/resource_bundle.h" 11 #include "app/resource_bundle.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/gfx/rect.h" 13 #include "base/gfx/rect.h"
14 #include "base/histogram.h" 14 #include "base/histogram.h"
15 #include "base/process_util.h" 15 #include "base/process_util.h"
16 #include "base/thread.h" 16 #include "base/thread.h"
17 #include "base/win_util.h" 17 #include "base/win_util.h"
18 #include "chrome/browser/browser_accessibility_manager.h" 18 #include "chrome/browser/browser_accessibility_manager.h"
19 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/browser_process.h"
20 #include "chrome/browser/browser_trial.h" 20 #include "chrome/browser/browser_trial.h"
21 #include "chrome/browser/chrome_thread.h"
21 #include "chrome/browser/plugin_process_host.h" 22 #include "chrome/browser/plugin_process_host.h"
22 #include "chrome/browser/renderer_host/backing_store.h" 23 #include "chrome/browser/renderer_host/backing_store.h"
23 #include "chrome/browser/renderer_host/render_process_host.h" 24 #include "chrome/browser/renderer_host/render_process_host.h"
24 #include "chrome/browser/renderer_host/render_widget_host.h" 25 #include "chrome/browser/renderer_host/render_widget_host.h"
25 #include "chrome/common/chrome_constants.h" 26 #include "chrome/common/chrome_constants.h"
26 #include "chrome/common/chrome_switches.h" 27 #include "chrome/common/chrome_switches.h"
27 #include "chrome/common/native_web_keyboard_event.h" 28 #include "chrome/common/native_web_keyboard_event.h"
28 #include "chrome/common/plugin_messages.h" 29 #include "chrome/common/plugin_messages.h"
29 #include "chrome/common/render_messages.h" 30 #include "chrome/common/render_messages.h"
30 #include "grit/webkit_resources.h" 31 #include "grit/webkit_resources.h"
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 } 405 }
405 DCHECK(window_class); 406 DCHECK(window_class);
406 407
407 HWND parent = CreateWindowEx( 408 HWND parent = CreateWindowEx(
408 WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR, 409 WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR,
409 MAKEINTATOM(window_class), 0, 410 MAKEINTATOM(window_class), 0,
410 WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, 411 WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
411 0, 0, 0, 0, ::GetParent(window), 0, GetModuleHandle(NULL), 0); 412 0, 0, 0, 0, ::GetParent(window), 0, GetModuleHandle(NULL), 0);
412 DCHECK(parent); 413 DCHECK(parent);
413 ::SetParent(window, parent); 414 ::SetParent(window, parent);
414 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, 415 ChromeThread::PostTask(
416 ChromeThread::IO, FROM_HERE,
415 new NotifyPluginProcessHostTask(window, parent)); 417 new NotifyPluginProcessHostTask(window, parent));
416 return parent; 418 return parent;
417 } 419 }
418 420
419 void RenderWidgetHostViewWin::Focus() { 421 void RenderWidgetHostViewWin::Focus() {
420 if (IsWindow()) 422 if (IsWindow())
421 SetFocus(); 423 SetFocus();
422 } 424 }
423 425
424 void RenderWidgetHostViewWin::Blur() { 426 void RenderWidgetHostViewWin::Blur() {
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 SetFocus(); 1402 SetFocus();
1401 } 1403 }
1402 } 1404 }
1403 1405
1404 void RenderWidgetHostViewWin::ShutdownHost() { 1406 void RenderWidgetHostViewWin::ShutdownHost() {
1405 shutdown_factory_.RevokeAll(); 1407 shutdown_factory_.RevokeAll();
1406 if (render_widget_host_) 1408 if (render_widget_host_)
1407 render_widget_host_->Shutdown(); 1409 render_widget_host_->Shutdown();
1408 // Do not touch any members at this point, |this| has been deleted. 1410 // Do not touch any members at this point, |this| has been deleted.
1409 } 1411 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_helper.cc ('k') | chrome/browser/renderer_host/resource_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698