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

Side by Side Diff: webkit/tools/test_shell/mac/test_webview_delegate.mm

Issue 9845017: Fix a few warnings that -Wnull-conversion of a future clang will complain about. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 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/plugins/npapi/webplugin_delegate_impl_mac.mm ('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) 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 "webkit/tools/test_shell/test_webview_delegate.h" 5 #include "webkit/tools/test_shell/test_webview_delegate.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 226
227 // WebPluginPageDelegate ------------------------------------------------------ 227 // WebPluginPageDelegate ------------------------------------------------------
228 228
229 webkit::npapi::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate( 229 webkit::npapi::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
230 const FilePath& path, 230 const FilePath& path,
231 const std::string& mime_type) { 231 const std::string& mime_type) {
232 WebWidgetHost *host = GetWidgetHost(); 232 WebWidgetHost *host = GetWidgetHost();
233 if (!host) 233 if (!host)
234 return NULL; 234 return NULL;
235 235
236 gfx::PluginWindowHandle containing_view = NULL; 236 gfx::PluginWindowHandle containing_view = gfx::kNullPluginWindow;
237 WebPluginDelegateImpl* delegate = 237 WebPluginDelegateImpl* delegate =
238 WebPluginDelegateImpl::Create(path, mime_type, containing_view); 238 WebPluginDelegateImpl::Create(path, mime_type, containing_view);
239 if (delegate) 239 if (delegate)
240 delegate->SetNoBufferContext(); 240 delegate->SetNoBufferContext();
241 return delegate; 241 return delegate;
242 } 242 }
243 243
244 void TestWebViewDelegate::CreatedPluginWindow( 244 void TestWebViewDelegate::CreatedPluginWindow(
245 gfx::PluginWindowHandle handle) { 245 gfx::PluginWindowHandle handle) {
246 } 246 }
(...skipping 29 matching lines...) Expand all
276 void TestWebViewDelegate::SetPageTitle(const string16& title) { 276 void TestWebViewDelegate::SetPageTitle(const string16& title) {
277 [[shell_->webViewHost()->view_handle() window] 277 [[shell_->webViewHost()->view_handle() window]
278 setTitle:[NSString stringWithUTF8String:UTF16ToUTF8(title).c_str()]]; 278 setTitle:[NSString stringWithUTF8String:UTF16ToUTF8(title).c_str()]];
279 } 279 }
280 280
281 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) { 281 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) {
282 const char* frameURL = url.spec().c_str(); 282 const char* frameURL = url.spec().c_str();
283 NSString *address = [NSString stringWithUTF8String:frameURL]; 283 NSString *address = [NSString stringWithUTF8String:frameURL];
284 [shell_->editWnd() setStringValue:address]; 284 [shell_->editWnd() setStringValue:address];
285 } 285 }
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/webplugin_delegate_impl_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698