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

Side by Side Diff: components/app_modal/javascript_app_modal_dialog.h

Issue 1732563002: Include suppressed dialogs in the FineTiming histogram (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | components/app_modal/javascript_app_modal_dialog.cc » ('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) 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 #ifndef COMPONENTS_APP_MODAL_JAVASCRIPT_APP_MODAL_DIALOG_H_ 5 #ifndef COMPONENTS_APP_MODAL_JAVASCRIPT_APP_MODAL_DIALOG_H_
6 #define COMPONENTS_APP_MODAL_JAVASCRIPT_APP_MODAL_DIALOG_H_ 6 #define COMPONENTS_APP_MODAL_JAVASCRIPT_APP_MODAL_DIALOG_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "components/app_modal/app_modal_dialog.h" 13 #include "components/app_modal/app_modal_dialog.h"
14 #include "content/public/browser/javascript_dialog_manager.h" 14 #include "content/public/browser/javascript_dialog_manager.h"
15 15
16 namespace app_modal { 16 namespace app_modal {
17 17
18 // Extra data for JavaScript dialogs to add Chrome-only features. 18 // Extra data for JavaScript dialogs to add Chrome-only features.
19 class ChromeJavaScriptDialogExtraData { 19 class ChromeJavaScriptDialogExtraData {
20 public: 20 public:
21 ChromeJavaScriptDialogExtraData(); 21 ChromeJavaScriptDialogExtraData();
22 22
23 // True if the user has already seen a JavaScript dialog from the WebContents. 23 // True if the user has already seen a JavaScript dialog from the WebContents.
24 bool has_already_shown_a_dialog_; 24 bool has_already_shown_a_dialog_;
25 25
26 // True if the user has decided to block future JavaScript dialogs. 26 // True if the user has decided to block future JavaScript dialogs.
27 bool suppress_javascript_messages_; 27 bool suppress_javascript_messages_;
28
29 // Number of dialogs from the origin that were suppressed.
30 int suppressed_dialog_count_;
28 }; 31 };
29 32
30 // A controller + model class for JavaScript alert, confirm, prompt, and 33 // A controller + model class for JavaScript alert, confirm, prompt, and
31 // onbeforeunload dialog boxes. 34 // onbeforeunload dialog boxes.
32 class JavaScriptAppModalDialog : public AppModalDialog { 35 class JavaScriptAppModalDialog : public AppModalDialog {
33 public: 36 public:
34 typedef std::map<void*, ChromeJavaScriptDialogExtraData> ExtraDataMap; 37 typedef std::map<void*, ChromeJavaScriptDialogExtraData> ExtraDataMap;
35 38
36 JavaScriptAppModalDialog( 39 JavaScriptAppModalDialog(
37 content::WebContents* web_contents, 40 content::WebContents* web_contents,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 bool use_override_prompt_text_; 104 bool use_override_prompt_text_;
102 105
103 base::TimeTicks creation_time_; 106 base::TimeTicks creation_time_;
104 107
105 DISALLOW_COPY_AND_ASSIGN(JavaScriptAppModalDialog); 108 DISALLOW_COPY_AND_ASSIGN(JavaScriptAppModalDialog);
106 }; 109 };
107 110
108 } // namespace app_modal 111 } // namespace app_modal
109 112
110 #endif // COMPONENTS_APP_MODAL_JAVASCRIPT_APP_MODAL_DIALOG_H_ 113 #endif // COMPONENTS_APP_MODAL_JAVASCRIPT_APP_MODAL_DIALOG_H_
OLDNEW
« no previous file with comments | « no previous file | components/app_modal/javascript_app_modal_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698