OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/child/blink_platform_impl.h" | 5 #include "content/child/blink_platform_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "content/child/content_child_helpers.h" | 42 #include "content/child/content_child_helpers.h" |
43 #include "content/child/notifications/notification_dispatcher.h" | 43 #include "content/child/notifications/notification_dispatcher.h" |
44 #include "content/child/notifications/notification_manager.h" | 44 #include "content/child/notifications/notification_manager.h" |
45 #include "content/child/push_messaging/push_dispatcher.h" | 45 #include "content/child/push_messaging/push_dispatcher.h" |
46 #include "content/child/push_messaging/push_provider.h" | 46 #include "content/child/push_messaging/push_provider.h" |
47 #include "content/child/thread_safe_sender.h" | 47 #include "content/child/thread_safe_sender.h" |
48 #include "content/child/web_url_loader_impl.h" | 48 #include "content/child/web_url_loader_impl.h" |
49 #include "content/child/web_url_request_util.h" | 49 #include "content/child/web_url_request_util.h" |
50 #include "content/child/worker_thread_registry.h" | 50 #include "content/child/worker_thread_registry.h" |
51 #include "content/public/common/content_client.h" | 51 #include "content/public/common/content_client.h" |
| 52 #include "content/public/common/service_manager_connection.h" |
52 #include "net/base/net_errors.h" | 53 #include "net/base/net_errors.h" |
53 #include "third_party/WebKit/public/platform/WebData.h" | 54 #include "third_party/WebKit/public/platform/WebData.h" |
54 #include "third_party/WebKit/public/platform/WebFloatPoint.h" | 55 #include "third_party/WebKit/public/platform/WebFloatPoint.h" |
55 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" | 56 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" |
56 #include "third_party/WebKit/public/platform/WebString.h" | 57 #include "third_party/WebKit/public/platform/WebString.h" |
57 #include "third_party/WebKit/public/platform/WebURL.h" | 58 #include "third_party/WebKit/public/platform/WebURL.h" |
58 #include "third_party/WebKit/public/platform/scheduler/child/webthread_impl_for_
worker_scheduler.h" | 59 #include "third_party/WebKit/public/platform/scheduler/child/webthread_impl_for_
worker_scheduler.h" |
59 #include "ui/base/layout.h" | 60 #include "ui/base/layout.h" |
60 #include "ui/events/gestures/blink/web_gesture_curve_impl.h" | 61 #include "ui/events/gestures/blink/web_gesture_curve_impl.h" |
61 #include "ui/events/keycodes/dom/keycode_converter.h" | 62 #include "ui/events/keycodes/dom/keycode_converter.h" |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 } | 784 } |
784 | 785 |
785 WebThemeEngine* BlinkPlatformImpl::themeEngine() { | 786 WebThemeEngine* BlinkPlatformImpl::themeEngine() { |
786 return &native_theme_engine_; | 787 return &native_theme_engine_; |
787 } | 788 } |
788 | 789 |
789 WebFallbackThemeEngine* BlinkPlatformImpl::fallbackThemeEngine() { | 790 WebFallbackThemeEngine* BlinkPlatformImpl::fallbackThemeEngine() { |
790 return &fallback_theme_engine_; | 791 return &fallback_theme_engine_; |
791 } | 792 } |
792 | 793 |
| 794 service_manager::Connector* BlinkPlatformImpl::serviceConnector() { |
| 795 if (!ChildThreadImpl::current()) |
| 796 return nullptr; |
| 797 return ChildThreadImpl::current() |
| 798 ->GetServiceManagerConnection() |
| 799 ->GetConnector(); |
| 800 } |
| 801 |
793 blink::Platform::FileHandle BlinkPlatformImpl::databaseOpenFile( | 802 blink::Platform::FileHandle BlinkPlatformImpl::databaseOpenFile( |
794 const blink::WebString& vfs_file_name, int desired_flags) { | 803 const blink::WebString& vfs_file_name, int desired_flags) { |
795 #if defined(OS_WIN) | 804 #if defined(OS_WIN) |
796 return INVALID_HANDLE_VALUE; | 805 return INVALID_HANDLE_VALUE; |
797 #elif defined(OS_POSIX) | 806 #elif defined(OS_POSIX) |
798 return -1; | 807 return -1; |
799 #endif | 808 #endif |
800 } | 809 } |
801 | 810 |
802 int BlinkPlatformImpl::databaseDeleteFile( | 811 int BlinkPlatformImpl::databaseDeleteFile( |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( | 894 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( |
886 static_cast<ui::DomKey>(dom_key))); | 895 static_cast<ui::DomKey>(dom_key))); |
887 } | 896 } |
888 | 897 |
889 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { | 898 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { |
890 return static_cast<int>( | 899 return static_cast<int>( |
891 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); | 900 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); |
892 } | 901 } |
893 | 902 |
894 } // namespace content | 903 } // namespace content |
OLD | NEW |