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

Side by Side Diff: webkit/support/webkit_support.cc

Issue 6090002: Expose Mac WebThemeEngine hooks added by r70278 (and r74581 on the WebKit sid... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
« no previous file with comments | « webkit/support/webkit_support.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "webkit/support/webkit_support.h" 5 #include "webkit/support/webkit_support.h"
6 6
7 #include "app/gfx/gl/gl_implementation.h" 7 #include "app/gfx/gl/gl_implementation.h"
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // TestWebKitClient must be instantiated after the MessageLoopForUI. 118 // TestWebKitClient must be instantiated after the MessageLoopForUI.
119 webkit_client_.reset(new TestWebKitClient(unit_test_mode)); 119 webkit_client_.reset(new TestWebKitClient(unit_test_mode));
120 } 120 }
121 121
122 ~TestEnvironment() { 122 ~TestEnvironment() {
123 SimpleResourceLoaderBridge::Shutdown(); 123 SimpleResourceLoaderBridge::Shutdown();
124 } 124 }
125 125
126 TestWebKitClient* webkit_client() const { return webkit_client_.get(); } 126 TestWebKitClient* webkit_client() const { return webkit_client_.get(); }
127 127
128 #if defined(OS_WIN) 128 #if defined(OS_WIN) || defined(OS_MACOSX)
129 void set_theme_engine(WebKit::WebThemeEngine* engine) { 129 void set_theme_engine(WebKit::WebThemeEngine* engine) {
130 DCHECK(webkit_client_ != 0); 130 DCHECK(webkit_client_ != 0);
131 webkit_client_->SetThemeEngine(engine); 131 webkit_client_->SetThemeEngine(engine);
132 } 132 }
133 133
134 WebKit::WebThemeEngine* theme_engine() const { 134 WebKit::WebThemeEngine* theme_engine() const {
135 return webkit_client_->themeEngine(); 135 return webkit_client_->themeEngine();
136 } 136 }
137 #endif 137 #endif
138 138
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 SimpleDatabaseSystem::GetInstance()->ClearAllDatabases(); 483 SimpleDatabaseSystem::GetInstance()->ClearAllDatabases();
484 } 484 }
485 485
486 // Bridge for SimpleResourceLoaderBridge 486 // Bridge for SimpleResourceLoaderBridge
487 487
488 void SetAcceptAllCookies(bool accept) { 488 void SetAcceptAllCookies(bool accept) {
489 SimpleResourceLoaderBridge::SetAcceptAllCookies(accept); 489 SimpleResourceLoaderBridge::SetAcceptAllCookies(accept);
490 } 490 }
491 491
492 // Theme engine 492 // Theme engine
493 #if defined(OS_WIN) 493 #if defined(OS_WIN) || defined(OS_MACOSX)
494 494
495 void SetThemeEngine(WebKit::WebThemeEngine* engine) { 495 void SetThemeEngine(WebKit::WebThemeEngine* engine) {
496 DCHECK(test_environment); 496 DCHECK(test_environment);
497 test_environment->set_theme_engine(engine); 497 test_environment->set_theme_engine(engine);
498 } 498 }
499 499
500 WebKit::WebThemeEngine* GetThemeEngine() { 500 WebKit::WebThemeEngine* GetThemeEngine() {
501 DCHECK(test_environment); 501 DCHECK(test_environment);
502 return test_environment->theme_engine(); 502 return test_environment->theme_engine();
503 } 503 }
(...skipping 20 matching lines...) Expand all
524 524
525 // FileSystem 525 // FileSystem
526 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, 526 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type,
527 long long size, bool create, WebFileSystemCallbacks* callbacks) { 527 long long size, bool create, WebFileSystemCallbacks* callbacks) {
528 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( 528 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>(
529 test_environment->webkit_client()->fileSystem()); 529 test_environment->webkit_client()->fileSystem());
530 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); 530 fileSystem->OpenFileSystem(frame, type, size, create, callbacks);
531 } 531 }
532 532
533 } // namespace webkit_support 533 } // namespace webkit_support
OLDNEW
« no previous file with comments | « webkit/support/webkit_support.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698