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

Side by Side Diff: components/printing/renderer/print_web_view_helper.cc

Issue 2828913003: Replace "nested message loop" with "nested run loop" in comments. (Closed)
Patch Set: rebase Created 3 years, 7 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 (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 "components/printing/renderer/print_web_view_helper.h" 5 #include "components/printing/renderer/print_web_view_helper.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 Print(web_frame, blink::WebNode(), true /* is_scripted? */); 982 Print(web_frame, blink::WebNode(), true /* is_scripted? */);
983 #endif 983 #endif
984 } 984 }
985 // WARNING: |this| may be gone at this point. Do not do any more work here and 985 // WARNING: |this| may be gone at this point. Do not do any more work here and
986 // just return. 986 // just return.
987 } 987 }
988 988
989 bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) { 989 bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
990 // The class is not designed to handle recursive messages. This is not 990 // The class is not designed to handle recursive messages. This is not
991 // expected during regular flow. However, during rendering of content for 991 // expected during regular flow. However, during rendering of content for
992 // printing, lower level code may run nested message loop. E.g. PDF may has 992 // printing, lower level code may run nested run loop. E.g. PDF may has
993 // script to show message box http://crbug.com/502562. In that moment browser 993 // script to show message box http://crbug.com/502562. In that moment browser
994 // may receive updated printer capabilities and decide to restart print 994 // may receive updated printer capabilities and decide to restart print
995 // preview generation. When this happened message handling function may 995 // preview generation. When this happened message handling function may
996 // choose to ignore message or safely crash process. 996 // choose to ignore message or safely crash process.
997 ++ipc_nesting_level_; 997 ++ipc_nesting_level_;
998 998
999 bool handled = true; 999 bool handled = true;
1000 IPC_BEGIN_MESSAGE_MAP(PrintWebViewHelper, message) 1000 IPC_BEGIN_MESSAGE_MAP(PrintWebViewHelper, message)
1001 #if BUILDFLAG(ENABLE_BASIC_PRINTING) 1001 #if BUILDFLAG(ENABLE_BASIC_PRINTING)
1002 IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages) 1002 IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages)
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after
2377 blink::WebConsoleMessage::kLevelWarning, message)); 2377 blink::WebConsoleMessage::kLevelWarning, message));
2378 return false; 2378 return false;
2379 } 2379 }
2380 2380
2381 void PrintWebViewHelper::ScriptingThrottler::Reset() { 2381 void PrintWebViewHelper::ScriptingThrottler::Reset() {
2382 // Reset counter on successful print. 2382 // Reset counter on successful print.
2383 count_ = 0; 2383 count_ = 0;
2384 } 2384 }
2385 2385
2386 } // namespace printing 2386 } // namespace printing
OLDNEW
« no previous file with comments | « components/printing/common/print_messages.h ('k') | content/browser/compositor/gpu_process_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698