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 "mojo/services/html_viewer/blink_platform_impl.h" | 5 #include "mojo/services/html_viewer/blink_platform_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 const char kUserAgentSwitch[] = "user-agent"; | 27 const char kUserAgentSwitch[] = "user-agent"; |
28 | 28 |
29 // TODO(darin): Figure out what our UA should really be. | 29 // TODO(darin): Figure out what our UA should really be. |
30 const char kDefaultUserAgentString[] = | 30 const char kDefaultUserAgentString[] = |
31 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) " | 31 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) " |
32 "Chrome/35.0.1916.153 Safari/537.36"; | 32 "Chrome/35.0.1916.153 Safari/537.36"; |
33 | 33 |
34 class WebWaitableEventImpl : public blink::WebWaitableEvent { | 34 class WebWaitableEventImpl : public blink::WebWaitableEvent { |
35 public: | 35 public: |
36 WebWaitableEventImpl() : impl_(new base::WaitableEvent(false, false)) {} | 36 WebWaitableEventImpl() : impl_(new base::WaitableEvent(false, false)) {} |
37 virtual ~WebWaitableEventImpl() {} | 37 ~WebWaitableEventImpl() override {} |
38 | 38 |
39 virtual void wait() { impl_->Wait(); } | 39 void wait() override { impl_->Wait(); } |
40 virtual void signal() { impl_->Signal(); } | 40 void signal() override { impl_->Signal(); } |
41 | 41 |
42 base::WaitableEvent* impl() { | 42 base::WaitableEvent* impl() { |
43 return impl_.get(); | 43 return impl_.get(); |
44 } | 44 } |
45 | 45 |
46 private: | 46 private: |
47 scoped_ptr<base::WaitableEvent> impl_; | 47 scoped_ptr<base::WaitableEvent> impl_; |
48 DISALLOW_COPY_AND_ASSIGN(WebWaitableEventImpl); | 48 DISALLOW_COPY_AND_ASSIGN(WebWaitableEventImpl); |
49 }; | 49 }; |
50 | 50 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 } | 258 } |
259 | 259 |
260 // static | 260 // static |
261 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { | 261 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { |
262 WebThreadImplForMessageLoop* impl = | 262 WebThreadImplForMessageLoop* impl = |
263 static_cast<WebThreadImplForMessageLoop*>(thread); | 263 static_cast<WebThreadImplForMessageLoop*>(thread); |
264 delete impl; | 264 delete impl; |
265 } | 265 } |
266 | 266 |
267 } // namespace html_viewer | 267 } // namespace html_viewer |
OLD | NEW |