| 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 15 matching lines...) Expand all Loading... |
| 26 const char kUserAgentSwitch[] = "user-agent"; | 26 const char kUserAgentSwitch[] = "user-agent"; |
| 27 | 27 |
| 28 // TODO(darin): Figure out what our UA should really be. | 28 // TODO(darin): Figure out what our UA should really be. |
| 29 const char kDefaultUserAgentString[] = | 29 const char kDefaultUserAgentString[] = |
| 30 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) " | 30 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) " |
| 31 "Chrome/35.0.1916.153 Safari/537.36"; | 31 "Chrome/35.0.1916.153 Safari/537.36"; |
| 32 | 32 |
| 33 class WebWaitableEventImpl : public blink::WebWaitableEvent { | 33 class WebWaitableEventImpl : public blink::WebWaitableEvent { |
| 34 public: | 34 public: |
| 35 WebWaitableEventImpl() : impl_(new base::WaitableEvent(false, false)) {} | 35 WebWaitableEventImpl() : impl_(new base::WaitableEvent(false, false)) {} |
| 36 virtual ~WebWaitableEventImpl() {} | 36 ~WebWaitableEventImpl() override {} |
| 37 | 37 |
| 38 virtual void wait() { impl_->Wait(); } | 38 void wait() override { impl_->Wait(); } |
| 39 virtual void signal() { impl_->Signal(); } | 39 void signal() override { impl_->Signal(); } |
| 40 | 40 |
| 41 base::WaitableEvent* impl() { | 41 base::WaitableEvent* impl() { |
| 42 return impl_.get(); | 42 return impl_.get(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 scoped_ptr<base::WaitableEvent> impl_; | 46 scoped_ptr<base::WaitableEvent> impl_; |
| 47 DISALLOW_COPY_AND_ASSIGN(WebWaitableEventImpl); | 47 DISALLOW_COPY_AND_ASSIGN(WebWaitableEventImpl); |
| 48 }; | 48 }; |
| 49 | 49 |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 } | 249 } |
| 250 | 250 |
| 251 // static | 251 // static |
| 252 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { | 252 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { |
| 253 WebThreadImplForMessageLoop* impl = | 253 WebThreadImplForMessageLoop* impl = |
| 254 static_cast<WebThreadImplForMessageLoop*>(thread); | 254 static_cast<WebThreadImplForMessageLoop*>(thread); |
| 255 delete impl; | 255 delete impl; |
| 256 } | 256 } |
| 257 | 257 |
| 258 } // namespace html_viewer | 258 } // namespace html_viewer |
| OLD | NEW |