Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: Source/web/WebPagePopupImpl.h

Issue 467573002: Cleanup namespace usage in Source/web/Web*.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/WebMediaPlayerClientImpl.h ('k') | Source/web/WebPageSerializerImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 20 matching lines...) Expand all
31 #ifndef WebPagePopupImpl_h 31 #ifndef WebPagePopupImpl_h
32 #define WebPagePopupImpl_h 32 #define WebPagePopupImpl_h
33 33
34 #include "core/page/PagePopup.h" 34 #include "core/page/PagePopup.h"
35 #include "public/web/WebPagePopup.h" 35 #include "public/web/WebPagePopup.h"
36 #include "web/PageWidgetDelegate.h" 36 #include "web/PageWidgetDelegate.h"
37 #include "wtf/OwnPtr.h" 37 #include "wtf/OwnPtr.h"
38 #include "wtf/RefCounted.h" 38 #include "wtf/RefCounted.h"
39 39
40 namespace blink { 40 namespace blink {
41
41 class GraphicsLayer; 42 class GraphicsLayer;
42 class Page; 43 class Page;
44 class PagePopupChromeClient;
43 class PagePopupClient; 45 class PagePopupClient;
44 class PlatformKeyboardEvent; 46 class PlatformKeyboardEvent;
45 }
46
47 namespace blink {
48
49 class PagePopupChromeClient;
50 class WebLayerTreeView; 47 class WebLayerTreeView;
51 class WebLayer; 48 class WebLayer;
52 class WebViewImpl; 49 class WebViewImpl;
53 50
54 class WebPagePopupImpl FINAL 51 class WebPagePopupImpl FINAL
55 : public WebPagePopup 52 : public WebPagePopup
56 , public PageWidgetEventHandler 53 , public PageWidgetEventHandler
57 , public blink::PagePopup 54 , public PagePopup
58 , public RefCounted<WebPagePopupImpl> { 55 , public RefCounted<WebPagePopupImpl> {
59 WTF_MAKE_NONCOPYABLE(WebPagePopupImpl); 56 WTF_MAKE_NONCOPYABLE(WebPagePopupImpl);
60 WTF_MAKE_FAST_ALLOCATED; 57 WTF_MAKE_FAST_ALLOCATED;
61 58
62 public: 59 public:
63 virtual ~WebPagePopupImpl(); 60 virtual ~WebPagePopupImpl();
64 bool initialize(WebViewImpl*, blink::PagePopupClient*, const blink::IntRect& originBoundsInRootView); 61 bool initialize(WebViewImpl*, PagePopupClient*, const IntRect& originBoundsI nRootView);
65 bool handleKeyEvent(const blink::PlatformKeyboardEvent&); 62 bool handleKeyEvent(const PlatformKeyboardEvent&);
66 void closePopup(); 63 void closePopup();
67 WebWidgetClient* widgetClient() const { return m_widgetClient; } 64 WebWidgetClient* widgetClient() const { return m_widgetClient; }
68 bool hasSamePopupClient(WebPagePopupImpl* other) { return other && m_popupCl ient == other->m_popupClient; } 65 bool hasSamePopupClient(WebPagePopupImpl* other) { return other && m_popupCl ient == other->m_popupClient; }
69 66
70 private: 67 private:
71 // WebWidget functions 68 // WebWidget functions
72 virtual WebSize size() OVERRIDE; 69 virtual WebSize size() OVERRIDE;
73 virtual void beginFrame(const WebBeginFrameArgs&) OVERRIDE; 70 virtual void beginFrame(const WebBeginFrameArgs&) OVERRIDE;
74 virtual void layout() OVERRIDE; 71 virtual void layout() OVERRIDE;
75 virtual void willCloseLayerTreeView() OVERRIDE; 72 virtual void willCloseLayerTreeView() OVERRIDE;
76 virtual void paint(WebCanvas*, const WebRect&) OVERRIDE; 73 virtual void paint(WebCanvas*, const WebRect&) OVERRIDE;
77 virtual void resize(const WebSize&) OVERRIDE; 74 virtual void resize(const WebSize&) OVERRIDE;
78 virtual void close() OVERRIDE; 75 virtual void close() OVERRIDE;
79 virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE; 76 virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE;
80 virtual void setFocus(bool) OVERRIDE; 77 virtual void setFocus(bool) OVERRIDE;
81 virtual bool isPagePopup() const OVERRIDE { return true; } 78 virtual bool isPagePopup() const OVERRIDE { return true; }
82 virtual bool isAcceleratedCompositingActive() const OVERRIDE { return m_isAc celeratedCompositingActive; } 79 virtual bool isAcceleratedCompositingActive() const OVERRIDE { return m_isAc celeratedCompositingActive; }
83 80
84 // PageWidgetEventHandler functions 81 // PageWidgetEventHandler functions
85 virtual bool handleKeyEvent(const WebKeyboardEvent&) OVERRIDE; 82 virtual bool handleKeyEvent(const WebKeyboardEvent&) OVERRIDE;
86 virtual bool handleCharEvent(const WebKeyboardEvent&) OVERRIDE; 83 virtual bool handleCharEvent(const WebKeyboardEvent&) OVERRIDE;
87 virtual bool handleGestureEvent(const WebGestureEvent&) OVERRIDE; 84 virtual bool handleGestureEvent(const WebGestureEvent&) OVERRIDE;
88 85
89 explicit WebPagePopupImpl(WebWidgetClient*); 86 explicit WebPagePopupImpl(WebWidgetClient*);
90 bool initializePage(); 87 bool initializePage();
91 void destroyPage(); 88 void destroyPage();
92 void setRootGraphicsLayer(blink::GraphicsLayer*); 89 void setRootGraphicsLayer(GraphicsLayer*);
93 void setIsAcceleratedCompositingActive(bool enter); 90 void setIsAcceleratedCompositingActive(bool enter);
94 91
95 WebWidgetClient* m_widgetClient; 92 WebWidgetClient* m_widgetClient;
96 WebRect m_windowRectInScreen; 93 WebRect m_windowRectInScreen;
97 WebViewImpl* m_webView; 94 WebViewImpl* m_webView;
98 OwnPtrWillBePersistent<blink::Page> m_page; 95 OwnPtrWillBePersistent<Page> m_page;
99 OwnPtr<PagePopupChromeClient> m_chromeClient; 96 OwnPtr<PagePopupChromeClient> m_chromeClient;
100 blink::PagePopupClient* m_popupClient; 97 PagePopupClient* m_popupClient;
101 bool m_closing; 98 bool m_closing;
102 99
103 WebLayerTreeView* m_layerTreeView; 100 WebLayerTreeView* m_layerTreeView;
104 WebLayer* m_rootLayer; 101 WebLayer* m_rootLayer;
105 blink::GraphicsLayer* m_rootGraphicsLayer; 102 GraphicsLayer* m_rootGraphicsLayer;
106 bool m_isAcceleratedCompositingActive; 103 bool m_isAcceleratedCompositingActive;
107 104
108 friend class WebPagePopup; 105 friend class WebPagePopup;
109 friend class PagePopupChromeClient; 106 friend class PagePopupChromeClient;
110 }; 107 };
111 108
112 DEFINE_TYPE_CASTS(WebPagePopupImpl, WebWidget, widget, widget->isPagePopup(), wi dget.isPagePopup()); 109 DEFINE_TYPE_CASTS(WebPagePopupImpl, WebWidget, widget, widget->isPagePopup(), wi dget.isPagePopup());
113 // WebPagePopupImpl is the only implementation of blink::PagePopup, so no 110 // WebPagePopupImpl is the only implementation of PagePopup, so no
114 // further checking required. 111 // further checking required.
115 DEFINE_TYPE_CASTS(WebPagePopupImpl, blink::PagePopup, popup, true, true); 112 DEFINE_TYPE_CASTS(WebPagePopupImpl, PagePopup, popup, true, true);
116 113
117 } // namespace blink 114 } // namespace blink
118 #endif // WebPagePopupImpl_h 115 #endif // WebPagePopupImpl_h
OLDNEW
« no previous file with comments | « Source/web/WebMediaPlayerClientImpl.h ('k') | Source/web/WebPageSerializerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698