OLD | NEW |
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 "chrome/browser/ui/app_modal_dialogs/javascript_app_modal_dialog.h" | 5 #include "chrome/browser/ui/app_modal_dialogs/javascript_app_modal_dialog.h" |
6 | 6 |
7 #include "chrome/browser/browser_shutdown.h" | 7 #include "chrome/browser/browser_shutdown.h" |
8 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" | 8 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 #include "content/public/browser/web_contents_view.h" | 10 #include "content/public/browser/web_contents_view.h" |
11 #include "ui/gfx/text_elider.h" | 11 #include "ui/gfx/text_elider.h" |
12 | 12 |
13 #if defined(USE_AURA) | 13 #if defined(USE_AURA) |
14 #include "ui/aura/root_window.h" | |
15 #include "ui/aura/window.h" | 14 #include "ui/aura/window.h" |
| 15 #include "ui/aura/window_event_dispatcher.h" |
16 #endif | 16 #endif |
17 | 17 |
18 using content::JavaScriptDialogManager; | 18 using content::JavaScriptDialogManager; |
19 using content::WebContents; | 19 using content::WebContents; |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 // Control maximum sizes of various texts passed to us from javascript. | 23 // Control maximum sizes of various texts passed to us from javascript. |
24 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 24 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
25 // Two-dimensional eliding. Reformat the text of the message dialog | 25 // Two-dimensional eliding. Reformat the text of the message dialog |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 if (extra_data != extra_data_map_->end()) { | 170 if (extra_data != extra_data_map_->end()) { |
171 extra_data->second.last_javascript_message_dismissal_ = | 171 extra_data->second.last_javascript_message_dismissal_ = |
172 base::TimeTicks::Now(); | 172 base::TimeTicks::Now(); |
173 extra_data->second.suppress_javascript_messages_ = suppress_js_messages; | 173 extra_data->second.suppress_javascript_messages_ = suppress_js_messages; |
174 } | 174 } |
175 | 175 |
176 // On Views, we can end up coming through this code path twice :(. | 176 // On Views, we can end up coming through this code path twice :(. |
177 // See crbug.com/63732. | 177 // See crbug.com/63732. |
178 AppModalDialog::Invalidate(); | 178 AppModalDialog::Invalidate(); |
179 } | 179 } |
OLD | NEW |