| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/pepper/ppb_graphics_3d_impl.h" | 5 #include "content/renderer/pepper/ppb_graphics_3d_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/feature_list.h" | 9 #include "base/feature_list.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 if (!bound_to_instance_) | 285 if (!bound_to_instance_) |
| 286 return; | 286 return; |
| 287 WebPluginContainer* container = | 287 WebPluginContainer* container = |
| 288 HostGlobals::Get()->GetInstance(pp_instance())->container(); | 288 HostGlobals::Get()->GetInstance(pp_instance())->container(); |
| 289 if (!container) | 289 if (!container) |
| 290 return; | 290 return; |
| 291 WebLocalFrame* frame = container->document().frame(); | 291 WebLocalFrame* frame = container->document().frame(); |
| 292 if (!frame) | 292 if (!frame) |
| 293 return; | 293 return; |
| 294 WebConsoleMessage console_message = WebConsoleMessage( | 294 WebConsoleMessage console_message = WebConsoleMessage( |
| 295 WebConsoleMessage::LevelError, WebString(base::UTF8ToUTF16(message))); | 295 WebConsoleMessage::LevelError, WebString::fromUTF8(message)); |
| 296 frame->addMessageToConsole(console_message); | 296 frame->addMessageToConsole(console_message); |
| 297 } | 297 } |
| 298 | 298 |
| 299 void PPB_Graphics3D_Impl::OnGpuControlLostContext() { | 299 void PPB_Graphics3D_Impl::OnGpuControlLostContext() { |
| 300 #if DCHECK_IS_ON() | 300 #if DCHECK_IS_ON() |
| 301 // This should never occur more than once. | 301 // This should never occur more than once. |
| 302 DCHECK(!lost_context_); | 302 DCHECK(!lost_context_); |
| 303 lost_context_ = true; | 303 lost_context_ = true; |
| 304 #endif | 304 #endif |
| 305 | 305 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 if (!mailboxes_to_reuse_.empty()) { | 358 if (!mailboxes_to_reuse_.empty()) { |
| 359 gpu::Mailbox mailbox = mailboxes_to_reuse_.back(); | 359 gpu::Mailbox mailbox = mailboxes_to_reuse_.back(); |
| 360 mailboxes_to_reuse_.pop_back(); | 360 mailboxes_to_reuse_.pop_back(); |
| 361 return mailbox; | 361 return mailbox; |
| 362 } | 362 } |
| 363 | 363 |
| 364 return gpu::Mailbox::Generate(); | 364 return gpu::Mailbox::Generate(); |
| 365 } | 365 } |
| 366 | 366 |
| 367 } // namespace content | 367 } // namespace content |
| OLD | NEW |