OLD | NEW |
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 Loading... |
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 struct RunnableMethodTraits<ModelessHtmlDialogDelegate> { | 371 void RunnableMethodTraits<ModelessHtmlDialogDelegate>::RetainCallee( |
372 void RetainCallee(ModelessHtmlDialogDelegate*) {} | 372 ModelessHtmlDialogDelegate* remover) { |
373 void ReleaseCallee(ModelessHtmlDialogDelegate*) {} | 373 } |
374 }; | 374 template<> |
| 375 void RunnableMethodTraits<ModelessHtmlDialogDelegate>::ReleaseCallee( |
| 376 ModelessHtmlDialogDelegate* remover) { |
| 377 } |
375 | 378 |
376 namespace { | 379 namespace { |
377 | 380 |
378 // | 381 // |
379 // Generic functions | 382 // Generic functions |
380 // | 383 // |
381 | 384 |
382 void STDCALL CPB_SetKeepProcessAlive(CPID id, CPBool keep_alive) { | 385 void STDCALL CPB_SetKeepProcessAlive(CPID id, CPBool keep_alive) { |
383 // This is a no-op in the main browser process | 386 // This is a no-op in the main browser process |
384 } | 387 } |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 void CPHandleCommand(int command, CPCommandInterface* data, | 820 void CPHandleCommand(int command, CPCommandInterface* data, |
818 CPBrowsingContext context) { | 821 CPBrowsingContext context) { |
819 // Sadly if we try and pass context through, we seem to break cl's little | 822 // Sadly if we try and pass context through, we seem to break cl's little |
820 // brain trying to compile the Tuple3 ctor. This cast works. | 823 // brain trying to compile the Tuple3 ctor. This cast works. |
821 int32 context_as_int32 = static_cast<int32>(context); | 824 int32 context_as_int32 = static_cast<int32>(context); |
822 // Plugins can only be accessed on the IO thread. | 825 // Plugins can only be accessed on the IO thread. |
823 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, | 826 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, |
824 NewRunnableFunction(PluginCommandHandler::HandleCommand, | 827 NewRunnableFunction(PluginCommandHandler::HandleCommand, |
825 command, data, context_as_int32)); | 828 command, data, context_as_int32)); |
826 } | 829 } |
OLD | NEW |