| 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_PRESENTATION_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_OFFSCREEN_PRESENTATION_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_OFFSCREEN_PRESENTATION_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_OFFSCREEN_PRESENTATION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "base/timer/timer.h" | 13 #include "base/timer/timer.h" |
| 14 #include "content/public/browser/web_contents_delegate.h" | 14 #include "content/public/browser/web_contents_delegate.h" |
| 15 #include "content/public/browser/web_contents_observer.h" | 15 #include "content/public/browser/web_contents_observer.h" |
| 16 #include "content/public/browser/web_contents_user_data.h" | 16 #include "content/public/browser/web_contents_user_data.h" |
| 17 #include "ui/gfx/geometry/size.h" | 17 #include "ui/gfx/geometry/size.h" |
| 18 | 18 |
| 19 class Profile; | 19 class Profile; |
| 20 | 20 |
| 21 namespace extensions { | 21 namespace extensions { |
| 22 | 22 |
| 23 // TODO(miu): This file and classes should be renamed, as this implementation |
| 24 // has expanded in scope to be used for all off-screen tabs. |
| 25 |
| 23 class OffscreenPresentation; // Forward declaration. See below. | 26 class OffscreenPresentation; // Forward declaration. See below. |
| 24 | 27 |
| 25 // Creates, owns, and manages all OffscreenPresentation instances created by the | 28 // Creates, owns, and manages all OffscreenPresentation instances created by the |
| 26 // same extension background page. When the extension background page's | 29 // same extension background page. When the extension background page's |
| 27 // WebContents is about to be destroyed, its associated | 30 // WebContents is about to be destroyed, its associated |
| 28 // OffscreenPresentationsOwner and all of its OffscreenPresentation instances | 31 // OffscreenPresentationsOwner and all of its OffscreenPresentation instances |
| 29 // are destroyed. | 32 // are destroyed. |
| 30 // | 33 // |
| 31 // Usage: | 34 // Usage: |
| 32 // | 35 // |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 // This is false until after the Start() method is called, and capture of the | 214 // This is false until after the Start() method is called, and capture of the |
| 212 // |presentation_web_contents_| is first detected. | 215 // |presentation_web_contents_| is first detected. |
| 213 bool content_capture_was_detected_; | 216 bool content_capture_was_detected_; |
| 214 | 217 |
| 215 DISALLOW_COPY_AND_ASSIGN(OffscreenPresentation); | 218 DISALLOW_COPY_AND_ASSIGN(OffscreenPresentation); |
| 216 }; | 219 }; |
| 217 | 220 |
| 218 } // namespace extensions | 221 } // namespace extensions |
| 219 | 222 |
| 220 #endif // CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_OFFSCREEN_PRESENTATION_H_ | 223 #endif // CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_OFFSCREEN_PRESENTATION_H_ |
| OLD | NEW |