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

Side by Side Diff: webkit/plugins/ppapi/plugin_module.cc

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | « webkit/plugins/ppapi/plugin_module.h ('k') | webkit/plugins/ppapi/ppapi_unittest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/plugins/ppapi/plugin_module.h" 5 #include "webkit/plugins/ppapi/plugin_module.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 393
394 PluginModule::EntryPoints::EntryPoints() 394 PluginModule::EntryPoints::EntryPoints()
395 : get_interface(NULL), 395 : get_interface(NULL),
396 initialize_module(NULL), 396 initialize_module(NULL),
397 shutdown_module(NULL) { 397 shutdown_module(NULL) {
398 } 398 }
399 399
400 // PluginModule ---------------------------------------------------------------- 400 // PluginModule ----------------------------------------------------------------
401 401
402 PluginModule::PluginModule(const std::string& name, 402 PluginModule::PluginModule(const std::string& name,
403 const FilePath& path, 403 const base::FilePath& path,
404 PluginDelegate::ModuleLifetime* lifetime_delegate, 404 PluginDelegate::ModuleLifetime* lifetime_delegate,
405 const ::ppapi::PpapiPermissions& perms) 405 const ::ppapi::PpapiPermissions& perms)
406 : lifetime_delegate_(lifetime_delegate), 406 : lifetime_delegate_(lifetime_delegate),
407 callback_tracker_(new ::ppapi::CallbackTracker), 407 callback_tracker_(new ::ppapi::CallbackTracker),
408 is_in_destructor_(false), 408 is_in_destructor_(false),
409 is_crashed_(false), 409 is_crashed_(false),
410 broker_(NULL), 410 broker_(NULL),
411 library_(NULL), 411 library_(NULL),
412 name_(name), 412 name_(name),
413 path_(path), 413 path_(path),
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 } 469 }
470 470
471 bool PluginModule::InitAsInternalPlugin(const EntryPoints& entry_points) { 471 bool PluginModule::InitAsInternalPlugin(const EntryPoints& entry_points) {
472 if (InitializeModule(entry_points)) { 472 if (InitializeModule(entry_points)) {
473 entry_points_ = entry_points; 473 entry_points_ = entry_points;
474 return true; 474 return true;
475 } 475 }
476 return false; 476 return false;
477 } 477 }
478 478
479 bool PluginModule::InitAsLibrary(const FilePath& path) { 479 bool PluginModule::InitAsLibrary(const base::FilePath& path) {
480 base::NativeLibrary library = base::LoadNativeLibrary(path, NULL); 480 base::NativeLibrary library = base::LoadNativeLibrary(path, NULL);
481 if (!library) 481 if (!library)
482 return false; 482 return false;
483 483
484 EntryPoints entry_points; 484 EntryPoints entry_points;
485 485
486 if (!LoadEntryPointsFromLibrary(library, &entry_points) || 486 if (!LoadEntryPointsFromLibrary(library, &entry_points) ||
487 !InitializeModule(entry_points)) { 487 !InitializeModule(entry_points)) {
488 base::UnloadNativeLibrary(library); 488 base::UnloadNativeLibrary(library);
489 return false; 489 return false;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 int retval = entry_points.initialize_module(pp_module(), &GetInterface); 634 int retval = entry_points.initialize_module(pp_module(), &GetInterface);
635 if (retval != 0) { 635 if (retval != 0) {
636 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; 636 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval;
637 return false; 637 return false;
638 } 638 }
639 return true; 639 return true;
640 } 640 }
641 641
642 } // namespace ppapi 642 } // namespace ppapi
643 } // namespace webkit 643 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.h ('k') | webkit/plugins/ppapi/ppapi_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698