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

Side by Side Diff: chrome/browser/chrome_plugin_host.cc

Issue 251012: Assert that thread-safe reference counting is used with... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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
« no previous file with comments | « chrome/browser/browsing_data_remover.cc ('k') | chrome/browser/chromeos/touchpad.cc » ('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) 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/chrome_plugin_host.h" 5 #include "chrome/browser/chrome_plugin_host.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 360
361 // The window this dialog box should be parented to, or NULL for the last 361 // The window this dialog box should be parented to, or NULL for the last
362 // active browser window. 362 // active browser window.
363 gfx::NativeWindow parent_wnd_; 363 gfx::NativeWindow parent_wnd_;
364 364
365 DISALLOW_EVIL_CONSTRUCTORS(ModelessHtmlDialogDelegate); 365 DISALLOW_EVIL_CONSTRUCTORS(ModelessHtmlDialogDelegate);
366 }; 366 };
367 367
368 // Allows InvokeLater without adding refcounting. The object is only deleted 368 // Allows InvokeLater without adding refcounting. The object is only deleted
369 // when its last InvokeLater is run anyway. 369 // when its last InvokeLater is run anyway.
370 template<> 370 template <>
371 void RunnableMethodTraits<ModelessHtmlDialogDelegate>::RetainCallee( 371 struct RunnableMethodTraits<ModelessHtmlDialogDelegate> {
372 ModelessHtmlDialogDelegate* remover) { 372 void RetainCallee(ModelessHtmlDialogDelegate*) {}
373 } 373 void ReleaseCallee(ModelessHtmlDialogDelegate*) {}
374 template<> 374 };
375 void RunnableMethodTraits<ModelessHtmlDialogDelegate>::ReleaseCallee(
376 ModelessHtmlDialogDelegate* remover) {
377 }
378 375
379 namespace { 376 namespace {
380 377
381 // 378 //
382 // Generic functions 379 // Generic functions
383 // 380 //
384 381
385 void STDCALL CPB_SetKeepProcessAlive(CPID id, CPBool keep_alive) { 382 void STDCALL CPB_SetKeepProcessAlive(CPID id, CPBool keep_alive) {
386 // This is a no-op in the main browser process 383 // This is a no-op in the main browser process
387 } 384 }
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 void CPHandleCommand(int command, CPCommandInterface* data, 817 void CPHandleCommand(int command, CPCommandInterface* data,
821 CPBrowsingContext context) { 818 CPBrowsingContext context) {
822 // Sadly if we try and pass context through, we seem to break cl's little 819 // Sadly if we try and pass context through, we seem to break cl's little
823 // brain trying to compile the Tuple3 ctor. This cast works. 820 // brain trying to compile the Tuple3 ctor. This cast works.
824 int32 context_as_int32 = static_cast<int32>(context); 821 int32 context_as_int32 = static_cast<int32>(context);
825 // Plugins can only be accessed on the IO thread. 822 // Plugins can only be accessed on the IO thread.
826 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, 823 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
827 NewRunnableFunction(PluginCommandHandler::HandleCommand, 824 NewRunnableFunction(PluginCommandHandler::HandleCommand,
828 command, data, context_as_int32)); 825 command, data, context_as_int32));
829 } 826 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data_remover.cc ('k') | chrome/browser/chromeos/touchpad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698