~abreu-alexandre/oxide/vibrate

« back to all changes in this revision

Viewing changes to shared/browser/oxide_content_browser_client.cc

  • Committer: Alexandre Abreu
  • Date: 2016-02-01 20:17:09 UTC
  • mfrom: (1272.4.2 vibrate)
  • Revision ID: alexandre.abreu@canonical.com-20160201201709-opshbr8b12s1gw9r
VibrationĀ APIĀ support

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include "base/logging.h"
26
26
#include "base/memory/ref_counted.h"
27
27
#include "base/memory/scoped_ptr.h"
 
28
#include "content/public/common/service_registry.h"
28
29
#include "content/public/browser/certificate_request_result_type.h"
29
30
#include "content/public/browser/geolocation_provider.h"
30
31
#include "content/public/browser/location_provider.h"
34
35
#include "content/public/browser/resource_dispatcher_host.h"
35
36
#include "content/public/common/content_switches.h"
36
37
#include "content/public/common/web_preferences.h"
 
38
#include "device/vibration/vibration_manager_impl.h"
37
39
 
38
40
#include "shared/browser/compositor/oxide_compositor_utils.h"
39
41
#include "shared/browser/media/oxide_media_capture_devices_dispatcher.h"
67
69
#include "pepper/oxide_pepper_host_factory_browser.h"
68
70
#endif
69
71
 
 
72
namespace {
 
73
 
 
74
void CreateVibrationManager(
 
75
      mojo::InterfaceRequest<device::VibrationManager> request) {
 
76
  oxide::BrowserPlatformIntegration::GetInstance()
 
77
    ->CreateVibrationManager(std::move(request));
 
78
}
 
79
 
 
80
}
 
81
 
70
82
namespace oxide {
71
83
 
72
84
content::BrowserMainParts* ContentBrowserClient::CreateBrowserMainParts(
306
318
  return application_locale_;
307
319
}
308
320
 
 
321
void ContentBrowserClient::RegisterRenderProcessMojoServices(
 
322
      content::ServiceRegistry* registry) {
 
323
  DCHECK(registry);
 
324
  registry->AddService(base::Bind(&CreateVibrationManager));
 
325
}
 
326
 
309
327
ContentBrowserClient::ContentBrowserClient(
310
328
    const std::string& application_locale,
311
329
    BrowserPlatformIntegration* integration)