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

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

Issue 398673003: Rename WebCore namespace to blink in bindings and web (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebPluginScrollbarImpl.cpp ('k') | Source/web/WebPopupMenuImpl.cpp » ('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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 21 matching lines...) Expand all
32 #define WebPopupMenuImpl_h 32 #define WebPopupMenuImpl_h
33 33
34 #include "platform/scroll/FramelessScrollViewClient.h" 34 #include "platform/scroll/FramelessScrollViewClient.h"
35 #include "public/platform/WebContentLayerClient.h" 35 #include "public/platform/WebContentLayerClient.h"
36 #include "public/platform/WebPoint.h" 36 #include "public/platform/WebPoint.h"
37 #include "public/platform/WebSize.h" 37 #include "public/platform/WebSize.h"
38 #include "public/web/WebPopupMenu.h" 38 #include "public/web/WebPopupMenu.h"
39 #include "wtf/OwnPtr.h" 39 #include "wtf/OwnPtr.h"
40 #include "wtf/RefCounted.h" 40 #include "wtf/RefCounted.h"
41 41
42 namespace WebCore { 42 namespace blink {
43 class LocalFrame; 43 class LocalFrame;
44 class FramelessScrollView; 44 class FramelessScrollView;
45 class KeyboardEvent; 45 class KeyboardEvent;
46 class Page; 46 class Page;
47 class PlatformKeyboardEvent; 47 class PlatformKeyboardEvent;
48 class Range; 48 class Range;
49 class Widget; 49 class Widget;
50 } 50 }
51 51
52 namespace blink { 52 namespace blink {
53 class WebContentLayer; 53 class WebContentLayer;
54 class WebGestureEvent; 54 class WebGestureEvent;
55 class WebKeyboardEvent; 55 class WebKeyboardEvent;
56 class WebLayerTreeView; 56 class WebLayerTreeView;
57 class WebMouseEvent; 57 class WebMouseEvent;
58 class WebMouseWheelEvent; 58 class WebMouseWheelEvent;
59 class WebRange; 59 class WebRange;
60 struct WebRect; 60 struct WebRect;
61 class WebTouchEvent; 61 class WebTouchEvent;
62 62
63 class WebPopupMenuImpl : public WebPopupMenu, public WebCore::FramelessScrollVie wClient, public WebContentLayerClient, public RefCounted<WebPopupMenuImpl> { 63 class WebPopupMenuImpl : public WebPopupMenu, public blink::FramelessScrollViewC lient, public WebContentLayerClient, public RefCounted<WebPopupMenuImpl> {
64 WTF_MAKE_FAST_ALLOCATED; 64 WTF_MAKE_FAST_ALLOCATED;
65 public: 65 public:
66 // WebWidget functions: 66 // WebWidget functions:
67 virtual void close() OVERRIDE FINAL; 67 virtual void close() OVERRIDE FINAL;
68 virtual WebSize size() OVERRIDE FINAL { return m_size; } 68 virtual WebSize size() OVERRIDE FINAL { return m_size; }
69 virtual void willStartLiveResize() OVERRIDE FINAL; 69 virtual void willStartLiveResize() OVERRIDE FINAL;
70 virtual void resize(const WebSize&) OVERRIDE FINAL; 70 virtual void resize(const WebSize&) OVERRIDE FINAL;
71 virtual void willEndLiveResize() OVERRIDE FINAL; 71 virtual void willEndLiveResize() OVERRIDE FINAL;
72 virtual void animate(double frameBeginTime) OVERRIDE FINAL; 72 virtual void animate(double frameBeginTime) OVERRIDE FINAL;
73 virtual void layout() OVERRIDE FINAL; 73 virtual void layout() OVERRIDE FINAL;
(...skipping 14 matching lines...) Expand all
88 virtual void setTextDirection(WebTextDirection) OVERRIDE FINAL; 88 virtual void setTextDirection(WebTextDirection) OVERRIDE FINAL;
89 virtual bool isAcceleratedCompositingActive() const OVERRIDE FINAL { return false; } 89 virtual bool isAcceleratedCompositingActive() const OVERRIDE FINAL { return false; }
90 virtual bool isPopupMenu() const OVERRIDE FINAL { return true; } 90 virtual bool isPopupMenu() const OVERRIDE FINAL { return true; }
91 virtual void willCloseLayerTreeView() OVERRIDE FINAL; 91 virtual void willCloseLayerTreeView() OVERRIDE FINAL;
92 92
93 // WebContentLayerClient 93 // WebContentLayerClient
94 virtual void paintContents(WebCanvas*, const WebRect& clip, bool canPaintLCD Test, WebFloatRect& opaque, 94 virtual void paintContents(WebCanvas*, const WebRect& clip, bool canPaintLCD Test, WebFloatRect& opaque,
95 WebContentLayerClient::GraphicsContextStatus = GraphicsContextEnabled) O VERRIDE FINAL; 95 WebContentLayerClient::GraphicsContextStatus = GraphicsContextEnabled) O VERRIDE FINAL;
96 96
97 // WebPopupMenuImpl 97 // WebPopupMenuImpl
98 void initialize(WebCore::FramelessScrollView* widget, const WebRect& bounds) ; 98 void initialize(blink::FramelessScrollView* widget, const WebRect& bounds);
99 99
100 WebWidgetClient* client() { return m_client; } 100 WebWidgetClient* client() { return m_client; }
101 101
102 void handleMouseMove(const WebMouseEvent&); 102 void handleMouseMove(const WebMouseEvent&);
103 void handleMouseLeave(const WebMouseEvent&); 103 void handleMouseLeave(const WebMouseEvent&);
104 void handleMouseDown(const WebMouseEvent&); 104 void handleMouseDown(const WebMouseEvent&);
105 void handleMouseUp(const WebMouseEvent&); 105 void handleMouseUp(const WebMouseEvent&);
106 void handleMouseDoubleClick(const WebMouseEvent&); 106 void handleMouseDoubleClick(const WebMouseEvent&);
107 void handleMouseWheel(const WebMouseWheelEvent&); 107 void handleMouseWheel(const WebMouseWheelEvent&);
108 bool handleGestureEvent(const WebGestureEvent&); 108 bool handleGestureEvent(const WebGestureEvent&);
109 bool handleTouchEvent(const WebTouchEvent&); 109 bool handleTouchEvent(const WebTouchEvent&);
110 bool handleKeyEvent(const WebKeyboardEvent&); 110 bool handleKeyEvent(const WebKeyboardEvent&);
111 111
112 protected: 112 protected:
113 friend class WebPopupMenu; // For WebPopupMenu::create. 113 friend class WebPopupMenu; // For WebPopupMenu::create.
114 friend class WTF::RefCounted<WebPopupMenuImpl>; 114 friend class WTF::RefCounted<WebPopupMenuImpl>;
115 115
116 WebPopupMenuImpl(WebWidgetClient*); 116 WebPopupMenuImpl(WebWidgetClient*);
117 ~WebPopupMenuImpl(); 117 ~WebPopupMenuImpl();
118 118
119 // WebCore::HostWindow methods: 119 // blink::HostWindow methods:
120 virtual void invalidateContentsAndRootView(const WebCore::IntRect&) OVERRIDE FINAL; 120 virtual void invalidateContentsAndRootView(const blink::IntRect&) OVERRIDE F INAL;
121 virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&) OVERRI DE FINAL; 121 virtual void invalidateContentsForSlowScroll(const blink::IntRect&) OVERRIDE FINAL;
122 virtual void scheduleAnimation() OVERRIDE FINAL; 122 virtual void scheduleAnimation() OVERRIDE FINAL;
123 virtual void scroll(const WebCore::IntRect& clipRect) OVERRIDE FINAL; 123 virtual void scroll(const blink::IntRect& clipRect) OVERRIDE FINAL;
124 virtual WebCore::IntRect rootViewToScreen(const WebCore::IntRect&) const OVE RRIDE FINAL; 124 virtual blink::IntRect rootViewToScreen(const blink::IntRect&) const OVERRID E FINAL;
125 virtual WebScreenInfo screenInfo() const OVERRIDE FINAL; 125 virtual WebScreenInfo screenInfo() const OVERRIDE FINAL;
126 126
127 // WebCore::FramelessScrollViewClient methods: 127 // blink::FramelessScrollViewClient methods:
128 virtual void popupClosed(WebCore::FramelessScrollView*) OVERRIDE FINAL; 128 virtual void popupClosed(blink::FramelessScrollView*) OVERRIDE FINAL;
129 129
130 WebWidgetClient* m_client; 130 WebWidgetClient* m_client;
131 WebSize m_size; 131 WebSize m_size;
132 132
133 WebLayerTreeView* m_layerTreeView; 133 WebLayerTreeView* m_layerTreeView;
134 OwnPtr<WebContentLayer> m_rootLayer; 134 OwnPtr<WebContentLayer> m_rootLayer;
135 135
136 WebPoint m_lastMousePosition; 136 WebPoint m_lastMousePosition;
137 137
138 // This is a non-owning ref. The popup will notify us via popupClosed() 138 // This is a non-owning ref. The popup will notify us via popupClosed()
139 // before it is destroyed. 139 // before it is destroyed.
140 WebCore::FramelessScrollView* m_widget; 140 blink::FramelessScrollView* m_widget;
141 }; 141 };
142 142
143 DEFINE_TYPE_CASTS(WebPopupMenuImpl, WebWidget, widget, widget->isPopupMenu(), wi dget.isPopupMenu()); 143 DEFINE_TYPE_CASTS(WebPopupMenuImpl, WebWidget, widget, widget->isPopupMenu(), wi dget.isPopupMenu());
144 // WebPopupMenuImpl is the only implementation of FramelessScrollViewClient, so 144 // WebPopupMenuImpl is the only implementation of FramelessScrollViewClient, so
145 // no need for further checking. 145 // no need for further checking.
146 DEFINE_TYPE_CASTS(WebPopupMenuImpl, WebCore::FramelessScrollViewClient, client, true, true); 146 DEFINE_TYPE_CASTS(WebPopupMenuImpl, blink::FramelessScrollViewClient, client, tr ue, true);
147 147
148 } // namespace blink 148 } // namespace blink
149 149
150 #endif 150 #endif
OLDNEW
« no previous file with comments | « Source/web/WebPluginScrollbarImpl.cpp ('k') | Source/web/WebPopupMenuImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698