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

Side by Side Diff: content/browser/web_contents/web_contents_impl_browsertest.cc

Issue 2412843002: Simplify the JavaScriptDialogManager. (Closed)
Patch Set: braces Created 4 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/macros.h" 5 #include "base/macros.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/browser/frame_host/navigation_entry_impl.h" 10 #include "content/browser/frame_host/navigation_entry_impl.h"
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 void RunBeforeUnloadDialog(WebContents* web_contents, 982 void RunBeforeUnloadDialog(WebContents* web_contents,
983 bool is_reload, 983 bool is_reload,
984 const DialogClosedCallback& callback) override {} 984 const DialogClosedCallback& callback) override {}
985 985
986 bool HandleJavaScriptDialog(WebContents* web_contents, 986 bool HandleJavaScriptDialog(WebContents* web_contents,
987 bool accept, 987 bool accept,
988 const base::string16* prompt_override) override { 988 const base::string16* prompt_override) override {
989 return true; 989 return true;
990 } 990 }
991 991
992 void CancelActiveAndPendingDialogs(WebContents* web_contents) override {} 992 void CancelDialogs(WebContents* web_contents,
993 993 bool suppress_callbacks,
994 void ResetDialogState(WebContents* web_contents) override {} 994 bool reset_state) override {}
995 995
996 private: 996 private:
997 std::string last_message_; 997 std::string last_message_;
998 998
999 // The MessageLoopRunner used to spin the message loop. 999 // The MessageLoopRunner used to spin the message loop.
1000 scoped_refptr<MessageLoopRunner> message_loop_runner_; 1000 scoped_refptr<MessageLoopRunner> message_loop_runner_;
1001 1001
1002 DISALLOW_COPY_AND_ASSIGN(TestJavaScriptDialogManager); 1002 DISALLOW_COPY_AND_ASSIGN(TestJavaScriptDialogManager);
1003 }; 1003 };
1004 1004
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 shell()->LoadURL(GURL("about:blank")); 1244 shell()->LoadURL(GURL("about:blank"));
1245 base::RunLoop run_loop; 1245 base::RunLoop run_loop;
1246 shell()->web_contents()->DownloadImage( 1246 shell()->web_contents()->DownloadImage(
1247 kImageUrl, false, 2, false, 1247 kImageUrl, false, 2, false,
1248 base::Bind(&ExpectNoValidImageCallback, run_loop.QuitClosure())); 1248 base::Bind(&ExpectNoValidImageCallback, run_loop.QuitClosure()));
1249 1249
1250 run_loop.Run(); 1250 run_loop.Run();
1251 } 1251 }
1252 1252
1253 } // namespace content 1253 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698