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

Side by Side Diff: webkit/glue/chrome_client_impl.cc

Issue 63093: Refactoring; switch the |filter| parameter into something that is more amenab... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « chrome/renderer/render_view.cc ('k') | webkit/glue/webview_delegate.h » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "config.h" 5 #include "config.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 8
9 MSVC_PUSH_WARNING_LEVEL(0); 9 MSVC_PUSH_WARNING_LEVEL(0);
10 #include "Cursor.h" 10 #include "Cursor.h"
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 } 490 }
491 491
492 void ChromeClientImpl::runOpenPanel(WebCore::Frame* frame, 492 void ChromeClientImpl::runOpenPanel(WebCore::Frame* frame,
493 PassRefPtr<WebCore::FileChooser> fileChooser) { 493 PassRefPtr<WebCore::FileChooser> fileChooser) {
494 WebViewDelegate* delegate = webview_->delegate(); 494 WebViewDelegate* delegate = webview_->delegate();
495 if (!delegate) 495 if (!delegate)
496 return; 496 return;
497 497
498 bool multiple_files = fileChooser->allowsMultipleFiles(); 498 bool multiple_files = fileChooser->allowsMultipleFiles();
499 499
500 std::wstring suggestion; 500 FilePath suggestion;
501 if (fileChooser->filenames().size() > 0) 501 if (fileChooser->filenames().size() > 0)
502 suggestion = webkit_glue::StringToStdWString(fileChooser->filenames()[0]); 502 suggestion = FilePath(
503 webkit_glue::StringToFilePathString(fileChooser->filenames()[0]));
503 504
504 WebFileChooserCallbackImpl* chooser = new WebFileChooserCallbackImpl(fileChoos er); 505 WebFileChooserCallbackImpl* chooser =
505 delegate->RunFileChooser(multiple_files, std::wstring(), suggestion, 506 new WebFileChooserCallbackImpl(fileChooser);
506 std::wstring(), chooser); 507 delegate->RunFileChooser(multiple_files, string16(), suggestion, chooser);
507 } 508 }
508 509
509 void ChromeClientImpl::popupOpened(WebCore::PopupContainer* popup_container, 510 void ChromeClientImpl::popupOpened(WebCore::PopupContainer* popup_container,
510 const WebCore::IntRect& bounds, 511 const WebCore::IntRect& bounds,
511 bool activatable, 512 bool activatable,
512 bool handle_external) { 513 bool handle_external) {
513 if (handle_external) { 514 if (handle_external) {
514 // We're going to handle the popup with native controls by the external 515 // We're going to handle the popup with native controls by the external
515 // embedder. 516 // embedder.
516 popupOpenedInternal(popup_container, bounds, activatable); 517 popupOpenedInternal(popup_container, bounds, activatable);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 WebViewDelegate* delegate = webview_->delegate(); 597 WebViewDelegate* delegate = webview_->delegate();
597 if (delegate) 598 if (delegate)
598 delegate->DisableSuddenTermination(); 599 delegate->DisableSuddenTermination();
599 } 600 }
600 601
601 void ChromeClientImpl::formStateDidChange(const WebCore::Node*) { 602 void ChromeClientImpl::formStateDidChange(const WebCore::Node*) {
602 WebViewDelegate* delegate = webview_->delegate(); 603 WebViewDelegate* delegate = webview_->delegate();
603 if (delegate) 604 if (delegate)
604 delegate->OnNavStateChanged(webview_); 605 delegate->OnNavStateChanged(webview_);
605 } 606 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | webkit/glue/webview_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698