| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_EXTENSIONS_API_TAB_CAPTURE_OFFSCREEN_TAB_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_OFFSCREEN_TAB_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_OFFSCREEN_TAB_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_OFFSCREEN_TAB_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // Creates the WebContents instance containing the offscreen tab's page, | 118 // Creates the WebContents instance containing the offscreen tab's page, |
| 119 // configures it for offscreen rendering at the given |initial_size|, and | 119 // configures it for offscreen rendering at the given |initial_size|, and |
| 120 // navigates it to |start_url|. This is invoked once by OffscreenTabsOwner | 120 // navigates it to |start_url|. This is invoked once by OffscreenTabsOwner |
| 121 // just after construction. | 121 // just after construction. |
| 122 void Start(const GURL& start_url, | 122 void Start(const GURL& start_url, |
| 123 const gfx::Size& initial_size, | 123 const gfx::Size& initial_size, |
| 124 const std::string& optional_presentation_id); | 124 const std::string& optional_presentation_id); |
| 125 | 125 |
| 126 // content::WebContentsDelegate overrides to provide the desired behaviors. | 126 // content::WebContentsDelegate overrides to provide the desired behaviors. |
| 127 void CloseContents(content::WebContents* source) final; | 127 void CloseContents(content::WebContents* source) final; |
| 128 bool ShouldSuppressDialogs(content::WebContents* source) final; | 128 bool ShouldSuppressDialogs(content::WebContents* source, |
| 129 bool before_unload) final; |
| 129 bool ShouldFocusLocationBarByDefault(content::WebContents* source) final; | 130 bool ShouldFocusLocationBarByDefault(content::WebContents* source) final; |
| 130 bool ShouldFocusPageAfterCrash() final; | 131 bool ShouldFocusPageAfterCrash() final; |
| 131 void CanDownload(const GURL& url, | 132 void CanDownload(const GURL& url, |
| 132 const std::string& request_method, | 133 const std::string& request_method, |
| 133 const base::Callback<void(bool)>& callback) final; | 134 const base::Callback<void(bool)>& callback) final; |
| 134 bool HandleContextMenu(const content::ContextMenuParams& params) final; | 135 bool HandleContextMenu(const content::ContextMenuParams& params) final; |
| 135 bool PreHandleKeyboardEvent(content::WebContents* source, | 136 bool PreHandleKeyboardEvent(content::WebContents* source, |
| 136 const content::NativeWebKeyboardEvent& event, | 137 const content::NativeWebKeyboardEvent& event, |
| 137 bool* is_keyboard_shortcut) final; | 138 bool* is_keyboard_shortcut) final; |
| 138 bool PreHandleGestureEvent(content::WebContents* source, | 139 bool PreHandleGestureEvent(content::WebContents* source, |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 // This is false until after the Start() method is called, and capture of the | 211 // This is false until after the Start() method is called, and capture of the |
| 211 // |offscreen_tab_web_contents_| is first detected. | 212 // |offscreen_tab_web_contents_| is first detected. |
| 212 bool content_capture_was_detected_; | 213 bool content_capture_was_detected_; |
| 213 | 214 |
| 214 DISALLOW_COPY_AND_ASSIGN(OffscreenTab); | 215 DISALLOW_COPY_AND_ASSIGN(OffscreenTab); |
| 215 }; | 216 }; |
| 216 | 217 |
| 217 } // namespace extensions | 218 } // namespace extensions |
| 218 | 219 |
| 219 #endif // CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_OFFSCREEN_TAB_H_ | 220 #endif // CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_OFFSCREEN_TAB_H_ |
| OLD | NEW |