[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for...
[WebKit-https.git] / Source / WebKit / UIProcess / ios / fullscreen / WKFullScreenViewController.mm
index 50c1f51..c505b26 100644 (file)
@@ -40,9 +40,6 @@
 #import <pal/spi/cocoa/AVKitSPI.h>
 #import <wtf/RetainPtr.h>
 
-using namespace WebCore;
-using namespace WebKit;
-
 static const NSTimeInterval showHideAnimationDuration = 0.1;
 static const NSTimeInterval pipHideAnimationDuration = 0.2;
 static const NSTimeInterval autoHideDelay = 4.0;
@@ -56,7 +53,7 @@ static const double requiredScore = 0.1;
 - (void)failedToEnterPictureInPicture;
 @end
 
-class WKFullScreenViewControllerPlaybackSessionModelClient : PlaybackSessionModelClient {
+class WKFullScreenViewControllerPlaybackSessionModelClient : WebCore::PlaybackSessionModelClient {
 public:
     void setParent(WKFullScreenViewController *parent) { m_parent = parent; }
 
@@ -74,7 +71,7 @@ public:
         m_parent.pictureInPictureActive = active;
     }
 
-    void setInterface(PlaybackSessionInterfaceAVKit* interface)
+    void setInterface(WebCore::PlaybackSessionInterfaceAVKit* interface)
     {
         if (m_interface == interface)
             return;
@@ -88,14 +85,14 @@ public:
 
 private:
     WKFullScreenViewController *m_parent { nullptr };
-    RefPtr<PlaybackSessionInterfaceAVKit> m_interface;
+    RefPtr<WebCore::PlaybackSessionInterfaceAVKit> m_interface;
 };
 
-class WKFullScreenViewControllerVideoFullscreenModelClient : VideoFullscreenModelClient {
+class WKFullScreenViewControllerVideoFullscreenModelClient : WebCore::VideoFullscreenModelClient {
 public:
     void setParent(WKFullScreenViewController *parent) { m_parent = parent; }
 
-    void setInterface(VideoFullscreenInterfaceAVKit* interface)
+    void setInterface(WebCore::VideoFullscreenInterfaceAVKit* interface)
     {
         if (m_interface == interface)
             return;
@@ -107,7 +104,7 @@ public:
             m_interface->videoFullscreenModel()->addClient(*this);
     }
 
-    VideoFullscreenInterfaceAVKit* interface() const { return m_interface.get(); }
+    WebCore::VideoFullscreenInterfaceAVKit* interface() const { return m_interface.get(); }
 
     void willEnterPictureInPicture() final
     {
@@ -126,7 +123,7 @@ public:
 
 private:
     WKFullScreenViewController *m_parent { nullptr };
-    RefPtr<VideoFullscreenInterfaceAVKit> m_interface;
+    RefPtr<WebCore::VideoFullscreenInterfaceAVKit> m_interface;
 };
 
 #pragma mark - _WKExtrinsicButton
@@ -152,7 +149,7 @@ private:
 
 @interface WKFullScreenViewController () <UIGestureRecognizerDelegate, UIToolbarDelegate>
 @property (weak, nonatomic) WKWebView *_webView; // Cannot be retained, see <rdar://problem/14884666>.
-@property (readonly, nonatomic) WebFullScreenManagerProxy* _manager;
+@property (readonly, nonatomic) WebKit::WebFullScreenManagerProxy* _manager;
 @property (readonly, nonatomic) WebCore::FloatBoxExtent _effectiveFullscreenInsets;
 @end
 
@@ -260,7 +257,7 @@ private:
 
 - (void)videoControlsManagerDidChange
 {
-    WebPageProxy* page = [self._webView _page];
+    WebKit::WebPageProxy* page = [self._webView _page];
     auto* videoFullscreenManager = page ? page->videoFullscreenManager() : nullptr;
     auto* videoFullscreenInterface = videoFullscreenManager ? videoFullscreenManager->controlsManagerInterface() : nullptr;
     auto* playbackSessionInterface = videoFullscreenInterface ? &videoFullscreenInterface->playbackSessionInterface() : nullptr;
@@ -268,7 +265,7 @@ private:
     _playbackClient.setInterface(playbackSessionInterface);
     _videoFullscreenClient.setInterface(videoFullscreenInterface);
 
-    PlaybackSessionModel* playbackSessionModel = playbackSessionInterface ? playbackSessionInterface->playbackSessionModel() : nullptr;
+    WebCore::PlaybackSessionModel* playbackSessionModel = playbackSessionInterface ? playbackSessionInterface->playbackSessionModel() : nullptr;
     self.playing = playbackSessionModel ? playbackSessionModel->isPlaying() : NO;
     [_pipButton setHidden:!playbackSessionModel];
 }
@@ -481,7 +478,7 @@ private:
 #pragma mark - Internal Interface
 
 @dynamic _manager;
-- (WebFullScreenManagerProxy*)_manager
+- (WebKit::WebFullScreenManagerProxy*)_manager
 {
     if (auto* page = [self._webView _page])
         return page->fullScreenManager();
@@ -507,11 +504,11 @@ private:
 
 - (void)_togglePiPAction:(id)sender
 {
-    WebPageProxy* page = [self._webView _page];
+    WebKit::WebPageProxy* page = [self._webView _page];
     if (!page)
         return;
 
-    PlaybackSessionManagerProxy* playbackSessionManager = page->playbackSessionManager();
+    WebKit::PlaybackSessionManagerProxy* playbackSessionManager = page->playbackSessionManager();
     if (!playbackSessionManager)
         return;
 
@@ -519,7 +516,7 @@ private:
     if (!playbackSessionInterface)
         return;
 
-    PlaybackSessionModel* playbackSessionModel = playbackSessionInterface->playbackSessionModel();
+    WebCore::PlaybackSessionModel* playbackSessionModel = playbackSessionInterface->playbackSessionModel();
     if (!playbackSessionModel)
         return;