| 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 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
| 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/devtools/devtools_contents_resizing_strategy.h" | 8 #include "chrome/browser/devtools/devtools_contents_resizing_strategy.h" |
| 9 #include "chrome/browser/devtools/devtools_toggle_action.h" | 9 #include "chrome/browser/devtools/devtools_toggle_action.h" |
| 10 #include "chrome/browser/devtools/devtools_ui_bindings.h" | 10 #include "chrome/browser/devtools/devtools_ui_bindings.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 bool ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& event); | 120 bool ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& event); |
| 121 | 121 |
| 122 // Reloads inspected web contents as if it was triggered from DevTools. | 122 // Reloads inspected web contents as if it was triggered from DevTools. |
| 123 void ReloadInspectedWebContents(bool ignore_cache); | 123 void ReloadInspectedWebContents(bool ignore_cache); |
| 124 | 124 |
| 125 // content::WebContentsDelegate overrides. | 125 // content::WebContentsDelegate overrides. |
| 126 content::WebContents* OpenURLFromTab( | 126 content::WebContents* OpenURLFromTab( |
| 127 content::WebContents* source, | 127 content::WebContents* source, |
| 128 const content::OpenURLParams& params) override; | 128 const content::OpenURLParams& params) override; |
| 129 | 129 |
| 130 void ShowCertificateViewer(int certificate_id); |
| 131 |
| 130 // BeforeUnload interception //////////////////////////////////////////////// | 132 // BeforeUnload interception //////////////////////////////////////////////// |
| 131 | 133 |
| 132 // In order to preserve any edits the user may have made in devtools, the | 134 // In order to preserve any edits the user may have made in devtools, the |
| 133 // beforeunload event of the inspected page is hooked - devtools gets the | 135 // beforeunload event of the inspected page is hooked - devtools gets the |
| 134 // first shot at handling beforeunload and presents a dialog to the user. If | 136 // first shot at handling beforeunload and presents a dialog to the user. If |
| 135 // the user accepts the dialog then the script is given a chance to handle | 137 // the user accepts the dialog then the script is given a chance to handle |
| 136 // it. This way 2 dialogs may be displayed: one from the devtools asking the | 138 // it. This way 2 dialogs may be displayed: one from the devtools asking the |
| 137 // user to confirm that they're ok with their devtools edits going away and | 139 // user to confirm that they're ok with their devtools edits going away and |
| 138 // another from the webpage as the result of its beforeunload handler. | 140 // another from the webpage as the result of its beforeunload handler. |
| 139 // The following set of methods handle beforeunload event flow through | 141 // The following set of methods handle beforeunload event flow through |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 base::Closure close_callback_; | 331 base::Closure close_callback_; |
| 330 | 332 |
| 331 base::TimeTicks inspect_element_start_time_; | 333 base::TimeTicks inspect_element_start_time_; |
| 332 scoped_ptr<DevToolsEventForwarder> event_forwarder_; | 334 scoped_ptr<DevToolsEventForwarder> event_forwarder_; |
| 333 | 335 |
| 334 friend class DevToolsEventForwarder; | 336 friend class DevToolsEventForwarder; |
| 335 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 337 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
| 336 }; | 338 }; |
| 337 | 339 |
| 338 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 340 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
| OLD | NEW |