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

Side by Side Diff: mojo/services/html_viewer/blink_platform_impl.h

Issue 562483002: mojo: Create a basic clipboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ;_; Created 6 years, 3 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
OLDNEW
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 #ifndef MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_ 5 #ifndef MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_
6 #define MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_ 6 #define MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/threading/thread_local_storage.h" 10 #include "base/threading/thread_local_storage.h"
11 #include "base/timer/timer.h" 11 #include "base/timer/timer.h"
12 #include "mojo/services/html_viewer/webmimeregistry_impl.h" 12 #include "mojo/services/html_viewer/webmimeregistry_impl.h"
13 #include "mojo/services/html_viewer/webthemeengine_impl.h" 13 #include "mojo/services/html_viewer/webthemeengine_impl.h"
14 #include "mojo/services/public/interfaces/network/network_service.mojom.h" 14 #include "mojo/services/public/interfaces/network/network_service.mojom.h"
15 #include "third_party/WebKit/public/platform/Platform.h" 15 #include "third_party/WebKit/public/platform/Platform.h"
16 #include "third_party/WebKit/public/platform/WebScrollbarBehavior.h" 16 #include "third_party/WebKit/public/platform/WebScrollbarBehavior.h"
17 17
18 namespace mojo { 18 namespace mojo {
19 class ApplicationImpl; 19 class ApplicationImpl;
20 class WebClipboardImpl;
20 class WebCookieJarImpl; 21 class WebCookieJarImpl;
21 22
22 class BlinkPlatformImpl : public blink::Platform { 23 class BlinkPlatformImpl : public blink::Platform {
23 public: 24 public:
24 explicit BlinkPlatformImpl(ApplicationImpl* app); 25 explicit BlinkPlatformImpl(ApplicationImpl* app);
25 virtual ~BlinkPlatformImpl(); 26 virtual ~BlinkPlatformImpl();
26 27
27 // blink::Platform methods: 28 // blink::Platform methods:
28 virtual blink::WebCookieJar* cookieJar(); 29 virtual blink::WebCookieJar* cookieJar();
30 virtual blink::WebClipboard* clipboard();
29 virtual blink::WebMimeRegistry* mimeRegistry(); 31 virtual blink::WebMimeRegistry* mimeRegistry();
30 virtual blink::WebThemeEngine* themeEngine(); 32 virtual blink::WebThemeEngine* themeEngine();
31 virtual blink::WebString defaultLocale(); 33 virtual blink::WebString defaultLocale();
32 virtual double currentTime(); 34 virtual double currentTime();
33 virtual double monotonicallyIncreasingTime(); 35 virtual double monotonicallyIncreasingTime();
34 virtual void cryptographicallyRandomValues( 36 virtual void cryptographicallyRandomValues(
35 unsigned char* buffer, size_t length); 37 unsigned char* buffer, size_t length);
36 virtual void setSharedTimerFiredFunction(void (*func)()); 38 virtual void setSharedTimerFiredFunction(void (*func)());
37 virtual void setSharedTimerFireInterval(double interval_seconds); 39 virtual void setSharedTimerFireInterval(double interval_seconds);
38 virtual void stopSharedTimer(); 40 virtual void stopSharedTimer();
(...skipping 28 matching lines...) Expand all
67 NetworkServicePtr network_service_; 69 NetworkServicePtr network_service_;
68 base::MessageLoop* main_loop_; 70 base::MessageLoop* main_loop_;
69 base::OneShotTimer<BlinkPlatformImpl> shared_timer_; 71 base::OneShotTimer<BlinkPlatformImpl> shared_timer_;
70 void (*shared_timer_func_)(); 72 void (*shared_timer_func_)();
71 double shared_timer_fire_time_; 73 double shared_timer_fire_time_;
72 bool shared_timer_fire_time_was_set_while_suspended_; 74 bool shared_timer_fire_time_was_set_while_suspended_;
73 int shared_timer_suspended_; // counter 75 int shared_timer_suspended_; // counter
74 base::ThreadLocalStorage::Slot current_thread_slot_; 76 base::ThreadLocalStorage::Slot current_thread_slot_;
75 WebThemeEngineImpl theme_engine_; 77 WebThemeEngineImpl theme_engine_;
76 scoped_ptr<WebCookieJarImpl> cookie_jar_; 78 scoped_ptr<WebCookieJarImpl> cookie_jar_;
79 scoped_ptr<WebClipboardImpl> clipboard_;
77 WebMimeRegistryImpl mime_registry_; 80 WebMimeRegistryImpl mime_registry_;
78 blink::WebScrollbarBehavior scrollbar_behavior_; 81 blink::WebScrollbarBehavior scrollbar_behavior_;
79 82
80 DISALLOW_COPY_AND_ASSIGN(BlinkPlatformImpl); 83 DISALLOW_COPY_AND_ASSIGN(BlinkPlatformImpl);
81 }; 84 };
82 85
83 } // namespace mojo 86 } // namespace mojo
84 87
85 #endif // MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_ 88 #endif // MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698