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 "base/macros.h" | 8 #include "base/macros.h" |
9 #include "chrome/browser/devtools/devtools_contents_resizing_strategy.h" | 9 #include "chrome/browser/devtools/devtools_contents_resizing_strategy.h" |
10 #include "chrome/browser/devtools/devtools_toggle_action.h" | 10 #include "chrome/browser/devtools/devtools_toggle_action.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 // Reloads inspected web contents as if it was triggered from DevTools. | 125 // Reloads inspected web contents as if it was triggered from DevTools. |
126 // Returns true if it has successfully handled reload, false if the caller | 126 // Returns true if it has successfully handled reload, false if the caller |
127 // is to proceed reload without DevTools interception. | 127 // is to proceed reload without DevTools interception. |
128 bool ReloadInspectedWebContents(bool bypass_cache); | 128 bool ReloadInspectedWebContents(bool bypass_cache); |
129 | 129 |
130 content::WebContents* OpenURLFromTab( | 130 content::WebContents* OpenURLFromTab( |
131 content::WebContents* source, | 131 content::WebContents* source, |
132 const content::OpenURLParams& params) override; | 132 const content::OpenURLParams& params) override; |
133 | 133 |
134 void ShowCertificateViewer(int certificate_id); | 134 void ShowCertificateViewer(scoped_refptr<net::X509Certificate> certificate); |
135 | 135 |
136 // BeforeUnload interception //////////////////////////////////////////////// | 136 // BeforeUnload interception //////////////////////////////////////////////// |
137 | 137 |
138 // In order to preserve any edits the user may have made in devtools, the | 138 // In order to preserve any edits the user may have made in devtools, the |
139 // beforeunload event of the inspected page is hooked - devtools gets the | 139 // beforeunload event of the inspected page is hooked - devtools gets the |
140 // first shot at handling beforeunload and presents a dialog to the user. If | 140 // first shot at handling beforeunload and presents a dialog to the user. If |
141 // the user accepts the dialog then the script is given a chance to handle | 141 // the user accepts the dialog then the script is given a chance to handle |
142 // it. This way 2 dialogs may be displayed: one from the devtools asking the | 142 // it. This way 2 dialogs may be displayed: one from the devtools asking the |
143 // user to confirm that they're ok with their devtools edits going away and | 143 // user to confirm that they're ok with their devtools edits going away and |
144 // another from the webpage as the result of its beforeunload handler. | 144 // another from the webpage as the result of its beforeunload handler. |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 base::Closure ready_for_test_callback_; | 345 base::Closure ready_for_test_callback_; |
346 | 346 |
347 base::TimeTicks inspect_element_start_time_; | 347 base::TimeTicks inspect_element_start_time_; |
348 std::unique_ptr<DevToolsEventForwarder> event_forwarder_; | 348 std::unique_ptr<DevToolsEventForwarder> event_forwarder_; |
349 | 349 |
350 friend class DevToolsEventForwarder; | 350 friend class DevToolsEventForwarder; |
351 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 351 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
352 }; | 352 }; |
353 | 353 |
354 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 354 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
OLD | NEW |