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

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

Issue 1463823003: Return a enumeration of the state of handling of InputEvents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 : public WebPagePopup 53 : public WebPagePopup
54 , public PageWidgetEventHandler 54 , public PageWidgetEventHandler
55 , public PagePopup 55 , public PagePopup
56 , public RefCounted<WebPagePopupImpl> { 56 , public RefCounted<WebPagePopupImpl> {
57 WTF_MAKE_NONCOPYABLE(WebPagePopupImpl); 57 WTF_MAKE_NONCOPYABLE(WebPagePopupImpl);
58 USING_FAST_MALLOC(WebPagePopupImpl); 58 USING_FAST_MALLOC(WebPagePopupImpl);
59 59
60 public: 60 public:
61 ~WebPagePopupImpl() override; 61 ~WebPagePopupImpl() override;
62 bool initialize(WebViewImpl*, PagePopupClient*); 62 bool initialize(WebViewImpl*, PagePopupClient*);
63 bool handleKeyEvent(const PlatformKeyboardEvent&); 63 WebInputEventResult handleKeyEvent(const PlatformKeyboardEvent&);
64 void closePopup(); 64 void closePopup();
65 WebWidgetClient* widgetClient() const { return m_widgetClient; } 65 WebWidgetClient* widgetClient() const { return m_widgetClient; }
66 bool hasSamePopupClient(WebPagePopupImpl* other) { return other && m_popupCl ient == other->m_popupClient; } 66 bool hasSamePopupClient(WebPagePopupImpl* other) { return other && m_popupCl ient == other->m_popupClient; }
67 LocalDOMWindow* window(); 67 LocalDOMWindow* window();
68 void layoutAndPaintAsync(WebLayoutAndPaintAsyncCallback*) override; 68 void layoutAndPaintAsync(WebLayoutAndPaintAsyncCallback*) override;
69 void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback*) overri de; 69 void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback*) overri de;
70 WebPoint positionRelativeToOwner() override; 70 WebPoint positionRelativeToOwner() override;
71 void postMessage(const String& message) override; 71 void postMessage(const String& message) override;
72 void cancel(); 72 void cancel();
73 73
74 private: 74 private:
75 // WebWidget functions 75 // WebWidget functions
76 void beginFrame(double lastFrameTimeMonotonic) override; 76 void beginFrame(double lastFrameTimeMonotonic) override;
77 void updateAllLifecyclePhases() override; 77 void updateAllLifecyclePhases() override;
78 void willCloseLayerTreeView() override; 78 void willCloseLayerTreeView() override;
79 void paint(WebCanvas*, const WebRect&) override; 79 void paint(WebCanvas*, const WebRect&) override;
80 void resize(const WebSize&) override; 80 void resize(const WebSize&) override;
81 void close() override; 81 void close() override;
82 bool handleInputEvent(const WebInputEvent&) override; 82 WebInputEventResult handleInputEvent(const WebInputEvent&) override;
83 void setFocus(bool) override; 83 void setFocus(bool) override;
84 bool isPagePopup() const override { return true; } 84 bool isPagePopup() const override { return true; }
85 bool isAcceleratedCompositingActive() const override { return m_isAccelerate dCompositingActive; } 85 bool isAcceleratedCompositingActive() const override { return m_isAccelerate dCompositingActive; }
86 86
87 // PageWidgetEventHandler functions 87 // PageWidgetEventHandler functions
88 bool handleKeyEvent(const WebKeyboardEvent&) override; 88 WebInputEventResult handleKeyEvent(const WebKeyboardEvent&) override;
89 bool handleCharEvent(const WebKeyboardEvent&) override; 89 WebInputEventResult handleCharEvent(const WebKeyboardEvent&) override;
90 bool handleGestureEvent(const WebGestureEvent&) override; 90 WebInputEventResult handleGestureEvent(const WebGestureEvent&) override;
91 void handleMouseDown(LocalFrame& mainFrame, const WebMouseEvent&) override; 91 void handleMouseDown(LocalFrame& mainFrame, const WebMouseEvent&) override;
92 bool handleMouseWheel(LocalFrame& mainFrame, const WebMouseWheelEvent&) over ride; 92 WebInputEventResult handleMouseWheel(LocalFrame& mainFrame, const WebMouseWh eelEvent&) override;
93 93
94 bool isMouseEventInWindow(const WebMouseEvent&); 94 bool isMouseEventInWindow(const WebMouseEvent&);
95 bool isGestureEventInWindow(const WebGestureEvent&); 95 bool isGestureEventInWindow(const WebGestureEvent&);
96 96
97 // PagePopup function 97 // PagePopup function
98 AXObject* rootAXObject() override; 98 AXObject* rootAXObject() override;
99 void setWindowRect(const IntRect&) override; 99 void setWindowRect(const IntRect&) override;
100 100
101 explicit WebPagePopupImpl(WebWidgetClient*); 101 explicit WebPagePopupImpl(WebWidgetClient*);
102 bool initializePage(); 102 bool initializePage();
(...skipping 18 matching lines...) Expand all
121 friend class PagePopupChromeClient; 121 friend class PagePopupChromeClient;
122 }; 122 };
123 123
124 DEFINE_TYPE_CASTS(WebPagePopupImpl, WebWidget, widget, widget->isPagePopup(), wi dget.isPagePopup()); 124 DEFINE_TYPE_CASTS(WebPagePopupImpl, WebWidget, widget, widget->isPagePopup(), wi dget.isPagePopup());
125 // WebPagePopupImpl is the only implementation of PagePopup, so no 125 // WebPagePopupImpl is the only implementation of PagePopup, so no
126 // further checking required. 126 // further checking required.
127 DEFINE_TYPE_CASTS(WebPagePopupImpl, PagePopup, popup, true, true); 127 DEFINE_TYPE_CASTS(WebPagePopupImpl, PagePopup, popup, true, true);
128 128
129 } // namespace blink 129 } // namespace blink
130 #endif // WebPagePopupImpl_h 130 #endif // WebPagePopupImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698