// Copyright 2021 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_FOCUS_DELEGATE_H_ #define CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_FOCUS_DELEGATE_H_ #include "build/build_config.h" #if BUILDFLAG(IS_ANDROID) #error "Unsupported on Android." #endif // BUILDFLAG(IS_ANDROID) #include "base/time/time.h" #include "chrome/browser/bad_message.h" #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" #include "content/public/browser/desktop_media_id.h" #include "content/public/browser/web_contents.h" #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" // When tab/window-capture is initiated, a window of opportunity opens, // during which the render process can instruct the browser process as to // whether to focus the tab/window or not. // The window of opportunity is closed when either: // (a) The render process sends its decision. // (b) After 1s elapses (MediaStreamManager independently calls SetFocus). // (c) The user changes the focused tab. // (d) The user changes the activated window. class MediaStreamFocusDelegate : public TabStripModelObserver { … }; #endif // CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_FOCUS_DELEGATE_H_