| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2012, Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2012, Samsung Electronics. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include <algorithm> | 24 #include <algorithm> |
| 25 #include "core/dom/Document.h" | 25 #include "core/dom/Document.h" |
| 26 #include "core/dom/Element.h" | 26 #include "core/dom/Element.h" |
| 27 #include "core/frame/FrameConsole.h" | 27 #include "core/frame/FrameConsole.h" |
| 28 #include "core/frame/LocalFrame.h" | 28 #include "core/frame/LocalFrame.h" |
| 29 #include "core/inspector/ConsoleMessage.h" | 29 #include "core/inspector/ConsoleMessage.h" |
| 30 #include "core/layout/HitTestResult.h" | 30 #include "core/layout/HitTestResult.h" |
| 31 #include "core/page/FrameTree.h" | 31 #include "core/page/FrameTree.h" |
| 32 #include "core/page/Page.h" | 32 #include "core/page/Page.h" |
| 33 #include "core/page/ScopedPageSuspender.h" | 33 #include "core/page/ScopedPageSuspender.h" |
| 34 #include "core/page/WindowFeatures.h" | |
| 35 #include "core/probe/CoreProbes.h" | 34 #include "core/probe/CoreProbes.h" |
| 36 #include "platform/geometry/IntRect.h" | 35 #include "platform/geometry/IntRect.h" |
| 37 #include "platform/network/NetworkHints.h" | 36 #include "platform/network/NetworkHints.h" |
| 38 #include "public/platform/WebScreenInfo.h" | 37 #include "public/platform/WebScreenInfo.h" |
| 39 | 38 |
| 40 namespace blink { | 39 namespace blink { |
| 41 | 40 |
| 42 DEFINE_TRACE(ChromeClient) { | 41 DEFINE_TRACE(ChromeClient) { |
| 43 visitor->Trace(last_mouse_over_node_); | 42 visitor->Trace(last_mouse_over_node_); |
| 44 PlatformChromeClient::Trace(visitor); | 43 PlatformChromeClient::Trace(visitor); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 Document::PageDismissalType dismissal = | 78 Document::PageDismissalType dismissal = |
| 80 local_frame.GetDocument()->PageDismissalEventBeingDispatched(); | 79 local_frame.GetDocument()->PageDismissalEventBeingDispatched(); |
| 81 if (dismissal != Document::kNoDismissal) { | 80 if (dismissal != Document::kNoDismissal) { |
| 82 return ShouldOpenModalDialogDuringPageDismissal(local_frame, dialog, | 81 return ShouldOpenModalDialogDuringPageDismissal(local_frame, dialog, |
| 83 message, dismissal); | 82 message, dismissal); |
| 84 } | 83 } |
| 85 } | 84 } |
| 86 return true; | 85 return true; |
| 87 } | 86 } |
| 88 | 87 |
| 89 void ChromeClient::SetWindowFeatures(const WindowFeatures& features) { | |
| 90 SetToolbarsVisible(features.tool_bar_visible || | |
| 91 features.location_bar_visible); | |
| 92 SetStatusbarVisible(features.status_bar_visible); | |
| 93 SetScrollbarsVisible(features.scrollbars_visible); | |
| 94 SetMenubarVisible(features.menu_bar_visible); | |
| 95 SetResizable(features.resizable); | |
| 96 } | |
| 97 | |
| 98 template <typename Delegate> | 88 template <typename Delegate> |
| 99 static bool OpenJavaScriptDialog(LocalFrame* frame, | 89 static bool OpenJavaScriptDialog(LocalFrame* frame, |
| 100 const String& message, | 90 const String& message, |
| 101 ChromeClient::DialogType dialog_type, | 91 ChromeClient::DialogType dialog_type, |
| 102 const Delegate& delegate) { | 92 const Delegate& delegate) { |
| 103 // Suspend pages in case the client method runs a new event loop that would | 93 // Suspend pages in case the client method runs a new event loop that would |
| 104 // otherwise cause the load to continue while we're in the middle of | 94 // otherwise cause the load to continue while we're in the middle of |
| 105 // executing JavaScript. | 95 // executing JavaScript. |
| 106 ScopedPageSuspender suspender; | 96 ScopedPageSuspender suspender; |
| 107 probe::willRunJavaScriptDialog(frame, message, dialog_type); | 97 probe::willRunJavaScriptDialog(frame, message, dialog_type); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 // Suspend pages in case the client method runs a new event loop that would | 230 // Suspend pages in case the client method runs a new event loop that would |
| 241 // otherwise cause the load to continue while we're in the middle of | 231 // otherwise cause the load to continue while we're in the middle of |
| 242 // executing JavaScript. | 232 // executing JavaScript. |
| 243 ScopedPageSuspender suspender; | 233 ScopedPageSuspender suspender; |
| 244 | 234 |
| 245 PrintDelegate(frame); | 235 PrintDelegate(frame); |
| 246 return true; | 236 return true; |
| 247 } | 237 } |
| 248 | 238 |
| 249 } // namespace blink | 239 } // namespace blink |
| OLD | NEW |