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

Side by Side Diff: webkit/tools/test_shell/test_webview_delegate.cc

Issue 9226036: Refactor WebGraphicsContext3DInProcess and TestWebGraphicsContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
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 // This file contains the implementation of TestWebViewDelegate, which serves 5 // This file contains the implementation of TestWebViewDelegate, which serves
6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to 6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to
7 // have initialized a MessageLoop before these methods are called. 7 // have initialized a MessageLoop before these methods are called.
8 8
9 #include "webkit/tools/test_shell/test_webview_delegate.h" 9 #include "webkit/tools/test_shell/test_webview_delegate.h"
10 10
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 // Enforce quota, ignoring the parameter from WebCore as in Chrome. 336 // Enforce quota, ignoring the parameter from WebCore as in Chrome.
337 return WebKit::WebStorageNamespace::createSessionStorageNamespace( 337 return WebKit::WebStorageNamespace::createSessionStorageNamespace(
338 WebStorageNamespace::m_sessionStorageQuota); 338 WebStorageNamespace::m_sessionStorageQuota);
339 } 339 }
340 340
341 WebGraphicsContext3D* TestWebViewDelegate::createGraphicsContext3D( 341 WebGraphicsContext3D* TestWebViewDelegate::createGraphicsContext3D(
342 WebGraphicsContext3D::Attributes attributes, 342 WebGraphicsContext3D::Attributes attributes,
343 bool direct) { 343 bool direct) {
344 if (!shell_->webView()) 344 if (!shell_->webView())
345 return NULL; 345 return NULL;
346 scoped_ptr<WebGraphicsContext3D> context( 346 return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView(
347 new webkit::gpu::WebGraphicsContext3DInProcessImpl( 347 attributes, shell_->webView(), direct);
348 gfx::kNullPluginWindow, NULL));
349 if (!context->initialize(attributes, shell_->webView(), direct))
350 return NULL;
351 return context.release();
352 } 348 }
353 349
354 void TestWebViewDelegate::didAddMessageToConsole( 350 void TestWebViewDelegate::didAddMessageToConsole(
355 const WebConsoleMessage& message, const WebString& source_name, 351 const WebConsoleMessage& message, const WebString& source_name,
356 unsigned source_line) { 352 unsigned source_line) {
357 logging::LogMessage("CONSOLE", 0).stream() << "\"" 353 logging::LogMessage("CONSOLE", 0).stream() << "\""
358 << message.text.utf8().data() 354 << message.text.utf8().data()
359 << ",\" source: " 355 << ",\" source: "
360 << source_name.utf8().data() 356 << source_name.utf8().data()
361 << "(" 357 << "("
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 } 1162 }
1167 1163
1168 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) { 1164 void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) {
1169 fake_rect_ = rect; 1165 fake_rect_ = rect;
1170 using_fake_rect_ = true; 1166 using_fake_rect_ = true;
1171 } 1167 }
1172 1168
1173 WebRect TestWebViewDelegate::fake_window_rect() { 1169 WebRect TestWebViewDelegate::fake_window_rect() {
1174 return fake_rect_; 1170 return fake_rect_;
1175 } 1171 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698