Chromium Code Reviews| Index: gpu/blink/webgraphicscontext3d_impl.cc |
| diff --git a/gpu/blink/webgraphicscontext3d_impl.cc b/gpu/blink/webgraphicscontext3d_impl.cc |
| index 5a5cdbd1fcacc165bc1ea17a55f163ed3bb1c02b..6c24341a141e131f8a4bf214cabd05ff0ea728e6 100644 |
| --- a/gpu/blink/webgraphicscontext3d_impl.cc |
| +++ b/gpu/blink/webgraphicscontext3d_impl.cc |
| @@ -26,27 +26,6 @@ |
| namespace gpu_blink { |
| -class WebGraphicsContext3DErrorMessageCallback |
| - : public ::gpu::gles2::GLES2ImplementationErrorMessageCallback { |
| - public: |
| - WebGraphicsContext3DErrorMessageCallback( |
| - WebGraphicsContext3DImpl* context) |
| - : graphics_context_(context) { |
| - } |
| - |
| - void OnErrorMessage(const char* msg, int id) override; |
| - |
| - private: |
| - WebGraphicsContext3DImpl* graphics_context_; |
| - |
| - DISALLOW_COPY_AND_ASSIGN(WebGraphicsContext3DErrorMessageCallback); |
| -}; |
| - |
| -void WebGraphicsContext3DErrorMessageCallback::OnErrorMessage( |
| - const char* msg, int id) { |
| - graphics_context_->OnErrorMessage(msg, id); |
| -} |
| - |
| WebGraphicsContext3DImpl::WebGraphicsContext3DImpl() |
| : initialized_(false), |
| initialize_failed_(false), |
| @@ -68,19 +47,9 @@ void WebGraphicsContext3DImpl::setContextLostCallback( |
| context_lost_callback_ = cb; |
| } |
| -::gpu::gles2::GLES2ImplementationErrorMessageCallback* |
| - WebGraphicsContext3DImpl::getErrorMessageCallback() { |
| - if (!client_error_message_callback_) { |
| - client_error_message_callback_.reset( |
| - new WebGraphicsContext3DErrorMessageCallback(this)); |
| - } |
| - return client_error_message_callback_.get(); |
| -} |
| - |
| -void WebGraphicsContext3DImpl::OnErrorMessage( |
| - const std::string& message, int id) { |
| +void WebGraphicsContext3DImpl::OnErrorMessage(const char* message, int id) { |
|
no sievers
2016/04/07 21:07:58
So only one of the two subclasses uses this? Shoul
danakj
2016/04/07 21:45:18
Ya I think that works. Done.
|
| if (error_message_callback_) { |
| - blink::WebString str = blink::WebString::fromUTF8(message.c_str()); |
| + blink::WebString str = blink::WebString::fromUTF8(message); |
| error_message_callback_->onErrorMessage(str, id); |
| } |
| } |