Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / web / PopupContainer.h
index 9924442..1f10a37 100644 (file)
@@ -1,3 +1,4 @@
+
 /*
  * Copyright (c) 2011, Google Inc. All rights reserved.
  *
 #ifndef PopupContainer_h
 #define PopupContainer_h
 
-#include "PopupListBox.h"
 #include "platform/PopupMenuStyle.h"
 #include "platform/geometry/FloatQuad.h"
 #include "platform/scroll/FramelessScrollView.h"
+#include "web/PopupListBox.h"
 
-namespace WebCore {
+namespace blink {
 
 class ChromeClient;
 class FrameView;
 class PopupMenuClient;
+struct WebPopupMenuInfo;
 
 class PopupContainer FINAL : public FramelessScrollView {
 public:
-    enum PopupType {
-        Select, // HTML select popup.
-        Suggestion, // Autocomplete/autofill popup.
-    };
-
-    static PassRefPtr<PopupContainer> create(PopupMenuClient*, PopupType, bool deviceSupportsTouch);
+    static PassRefPtr<PopupContainer> create(PopupMenuClient*, bool deviceSupportsTouch);
 
     // Whether a key event should be sent to this popup.
     bool isInterestedInEventForKey(int keyCode);
@@ -95,7 +92,7 @@ public:
     IntRect refresh(const IntRect& targetControlRect);
 
     // The menu per-item data.
-    const WTF::Vector<PopupItem*>& popupData() const;
+    const Vector<PopupItem*>& popupData() const;
 
     // The height of a row in the menu.
     int menuItemHeight() const;
@@ -106,8 +103,6 @@ public:
     // The style of the menu being used.
     PopupMenuStyle menuStyle() const;
 
-    PopupType popupType() const { return m_popupType; }
-
     // While hovering popup menu window, we want to show tool tip message.
     String getSelectedItemToolTip();
 
@@ -117,7 +112,7 @@ public:
 private:
     friend class WTF::RefCounted<PopupContainer>;
 
-    PopupContainer(PopupMenuClient*, PopupType, bool deviceSupportsTouch);
+    PopupContainer(PopupMenuClient*, bool deviceSupportsTouch);
     virtual ~PopupContainer();
 
     // Paint the border.
@@ -128,14 +123,15 @@ private:
 
     void fitToListBox();
 
+    void popupOpened(const IntRect& bounds);
+    void getPopupMenuInfo(WebPopupMenuInfo*);
+
     // Returns the ChromeClient of the page this popup is associated with.
     ChromeClient& chromeClient();
 
     RefPtr<PopupListBox> m_listBox;
     RefPtr<FrameView> m_frameView;
 
-    PopupType m_popupType;
-
     // m_controlPosition contains the transformed position of the
     // <select>/<input> associated with this popup. m_controlSize is the size
     // of the <select>/<input> without transform.
@@ -155,6 +151,6 @@ private:
     bool m_popupOpen;
 };
 
-} // namespace WebCore
+} // namespace blink
 
 #endif