| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 int x, | 112 int x, |
| 113 int y); | 113 int y); |
| 114 | 114 |
| 115 // Sets closure to be called after load is done. If already loaded, calls | 115 // Sets closure to be called after load is done. If already loaded, calls |
| 116 // closure immediately. | 116 // closure immediately. |
| 117 void SetLoadCompletedCallback(const base::Closure& closure); | 117 void SetLoadCompletedCallback(const base::Closure& closure); |
| 118 | 118 |
| 119 // Forwards an unhandled keyboard event to the DevTools frontend. | 119 // Forwards an unhandled keyboard event to the DevTools frontend. |
| 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. |
| 123 void ReloadInspectedWebContents(bool ignore_cache); |
| 124 |
| 122 // content::WebContentsDelegate overrides. | 125 // content::WebContentsDelegate overrides. |
| 123 content::WebContents* OpenURLFromTab( | 126 content::WebContents* OpenURLFromTab( |
| 124 content::WebContents* source, | 127 content::WebContents* source, |
| 125 const content::OpenURLParams& params) override; | 128 const content::OpenURLParams& params) override; |
| 126 | 129 |
| 127 // BeforeUnload interception //////////////////////////////////////////////// | 130 // BeforeUnload interception //////////////////////////////////////////////// |
| 128 | 131 |
| 129 // In order to preserve any edits the user may have made in devtools, the | 132 // In order to preserve any edits the user may have made in devtools, the |
| 130 // beforeunload event of the inspected page is hooked - devtools gets the | 133 // beforeunload event of the inspected page is hooked - devtools gets the |
| 131 // first shot at handling beforeunload and presents a dialog to the user. If | 134 // first shot at handling beforeunload and presents a dialog to the user. If |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 base::Closure close_callback_; | 329 base::Closure close_callback_; |
| 327 | 330 |
| 328 base::TimeTicks inspect_element_start_time_; | 331 base::TimeTicks inspect_element_start_time_; |
| 329 scoped_ptr<DevToolsEventForwarder> event_forwarder_; | 332 scoped_ptr<DevToolsEventForwarder> event_forwarder_; |
| 330 | 333 |
| 331 friend class DevToolsEventForwarder; | 334 friend class DevToolsEventForwarder; |
| 332 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 335 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
| 333 }; | 336 }; |
| 334 | 337 |
| 335 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 338 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
| OLD | NEW |