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

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

Issue 2290313002: Remove PlatformKeyboardEvent (Closed)
Patch Set: One more fix Created 4 years, 3 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
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 24 matching lines...) Expand all
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/RefCounted.h" 37 #include "wtf/RefCounted.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class GraphicsLayer; 41 class GraphicsLayer;
42 class Page; 42 class Page;
43 class PagePopupChromeClient; 43 class PagePopupChromeClient;
44 class PagePopupClient; 44 class PagePopupClient;
45 class PlatformKeyboardEvent;
46 class WebLayerTreeView; 45 class WebLayerTreeView;
47 class WebLayer; 46 class WebLayer;
48 class WebViewImpl; 47 class WebViewImpl;
49 class LocalDOMWindow; 48 class LocalDOMWindow;
50 49
51 class WebPagePopupImpl final 50 class WebPagePopupImpl final
52 : public WebPagePopup 51 : public WebPagePopup
53 , public PageWidgetEventHandler 52 , public PageWidgetEventHandler
54 , public PagePopup 53 , public PagePopup
55 , public RefCounted<WebPagePopupImpl> { 54 , public RefCounted<WebPagePopupImpl> {
56 WTF_MAKE_NONCOPYABLE(WebPagePopupImpl); 55 WTF_MAKE_NONCOPYABLE(WebPagePopupImpl);
57 USING_FAST_MALLOC(WebPagePopupImpl); 56 USING_FAST_MALLOC(WebPagePopupImpl);
58 57
59 public: 58 public:
60 ~WebPagePopupImpl() override; 59 ~WebPagePopupImpl() override;
61 bool initialize(WebViewImpl*, PagePopupClient*); 60 bool initialize(WebViewImpl*, PagePopupClient*);
62 WebInputEventResult handleKeyEvent(const PlatformKeyboardEvent&);
63 void closePopup(); 61 void closePopup();
64 WebWidgetClient* widgetClient() const { return m_widgetClient; } 62 WebWidgetClient* widgetClient() const { return m_widgetClient; }
65 bool hasSamePopupClient(WebPagePopupImpl* other) { return other && m_popupCl ient == other->m_popupClient; } 63 bool hasSamePopupClient(WebPagePopupImpl* other) { return other && m_popupCl ient == other->m_popupClient; }
66 LocalDOMWindow* window(); 64 LocalDOMWindow* window();
67 void layoutAndPaintAsync(WebLayoutAndPaintAsyncCallback*) override; 65 void layoutAndPaintAsync(WebLayoutAndPaintAsyncCallback*) override;
68 void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback*) overri de; 66 void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback*) overri de;
69 WebPoint positionRelativeToOwner() override; 67 WebPoint positionRelativeToOwner() override;
70 void postMessage(const String& message) override; 68 void postMessage(const String& message) override;
71 void cancel(); 69 void cancel();
72 70
71 // PageWidgetEventHandler functions.
72 WebInputEventResult handleKeyEvent(const WebKeyboardEvent&) override;
73
73 private: 74 private:
74 // WebWidget functions 75 // WebWidget functions
75 void beginFrame(double lastFrameTimeMonotonic) override; 76 void beginFrame(double lastFrameTimeMonotonic) override;
76 void updateAllLifecyclePhases() override; 77 void updateAllLifecyclePhases() override;
77 void willCloseLayerTreeView() override; 78 void willCloseLayerTreeView() override;
78 void paint(WebCanvas*, const WebRect&) override; 79 void paint(WebCanvas*, const WebRect&) override;
79 void resize(const WebSize&) override; 80 void resize(const WebSize&) override;
80 void close() override; 81 void close() override;
81 WebInputEventResult handleInputEvent(const WebInputEvent&) override; 82 WebInputEventResult handleInputEvent(const WebInputEvent&) override;
82 void setFocus(bool) override; 83 void setFocus(bool) override;
83 bool isPagePopup() const override { return true; } 84 bool isPagePopup() const override { return true; }
84 bool isAcceleratedCompositingActive() const override { return m_isAccelerate dCompositingActive; } 85 bool isAcceleratedCompositingActive() const override { return m_isAccelerate dCompositingActive; }
85 86
86 // PageWidgetEventHandler functions 87 // PageWidgetEventHandler functions
87 WebInputEventResult handleKeyEvent(const WebKeyboardEvent&) override;
88 WebInputEventResult handleCharEvent(const WebKeyboardEvent&) override; 88 WebInputEventResult handleCharEvent(const WebKeyboardEvent&) override;
89 WebInputEventResult handleGestureEvent(const WebGestureEvent&) override; 89 WebInputEventResult handleGestureEvent(const WebGestureEvent&) override;
90 void handleMouseDown(LocalFrame& mainFrame, const WebMouseEvent&) override; 90 void handleMouseDown(LocalFrame& mainFrame, const WebMouseEvent&) override;
91 WebInputEventResult handleMouseWheel(LocalFrame& mainFrame, const WebMouseWh eelEvent&) override; 91 WebInputEventResult handleMouseWheel(LocalFrame& mainFrame, const WebMouseWh eelEvent&) override;
92 92
93 bool isViewportPointInWindow(int x, int y); 93 bool isViewportPointInWindow(int x, int y);
94 94
95 // PagePopup function 95 // PagePopup function
96 AXObject* rootAXObject() override; 96 AXObject* rootAXObject() override;
97 void setWindowRect(const IntRect&) override; 97 void setWindowRect(const IntRect&) override;
(...skipping 22 matching lines...) Expand all
120 friend class PagePopupChromeClient; 120 friend class PagePopupChromeClient;
121 }; 121 };
122 122
123 DEFINE_TYPE_CASTS(WebPagePopupImpl, WebWidget, widget, widget->isPagePopup(), wi dget.isPagePopup()); 123 DEFINE_TYPE_CASTS(WebPagePopupImpl, WebWidget, widget, widget->isPagePopup(), wi dget.isPagePopup());
124 // WebPagePopupImpl is the only implementation of PagePopup, so no 124 // WebPagePopupImpl is the only implementation of PagePopup, so no
125 // further checking required. 125 // further checking required.
126 DEFINE_TYPE_CASTS(WebPagePopupImpl, PagePopup, popup, true, true); 126 DEFINE_TYPE_CASTS(WebPagePopupImpl, PagePopup, popup, true, true);
127 127
128 } // namespace blink 128 } // namespace blink
129 #endif // WebPagePopupImpl_h 129 #endif // WebPagePopupImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698