Commit ba0ce51a authored by deepak.sa@samsung.com's avatar deepak.sa@samsung.com

Cleanup namespace usage in Source/web/[A-V]*.h

This patch removes unnecessary blink:: prefixes.
Also it merges *namspace blink{}* blocks.

BUG=

Review URL: https://codereview.chromium.org/462613002

git-svn-id: svn://svn.chromium.org/blink/trunk@179959 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 09918317
...@@ -37,10 +37,9 @@ ...@@ -37,10 +37,9 @@
#include "wtf/OwnPtr.h" #include "wtf/OwnPtr.h"
#include "wtf/RefPtr.h" #include "wtf/RefPtr.h"
namespace blink { class DocumentThreadableLoader; }
namespace blink { namespace blink {
class DocumentThreadableLoader;
class WebLocalFrameImpl; class WebLocalFrameImpl;
// This class is used to implement WebFrame::createAssociatedURLLoader. // This class is used to implement WebFrame::createAssociatedURLLoader.
...@@ -64,7 +63,7 @@ private: ...@@ -64,7 +63,7 @@ private:
WebURLLoaderOptions m_options; WebURLLoaderOptions m_options;
WebURLLoaderClient* m_client; WebURLLoaderClient* m_client;
OwnPtr<ClientAdapter> m_clientAdapter; OwnPtr<ClientAdapter> m_clientAdapter;
RefPtr<blink::DocumentThreadableLoader> m_loader; RefPtr<DocumentThreadableLoader> m_loader;
}; };
} // namespace blink } // namespace blink
......
...@@ -35,40 +35,37 @@ ...@@ -35,40 +35,37 @@
#include "core/page/PagePopupClient.h" #include "core/page/PagePopupClient.h"
#include "platform/DateTimeChooser.h" #include "platform/DateTimeChooser.h"
namespace blink {
class PagePopup;
class DateTimeChooserClient;
}
namespace blink { namespace blink {
class ChromeClientImpl; class ChromeClientImpl;
class DateTimeChooserClient;
class PagePopup;
class DateTimeChooserImpl FINAL : public blink::DateTimeChooser, public blink::PagePopupClient { class DateTimeChooserImpl FINAL : public DateTimeChooser, public PagePopupClient {
public: public:
static PassRefPtrWillBeRawPtr<DateTimeChooserImpl> create(ChromeClientImpl*, blink::DateTimeChooserClient*, const blink::DateTimeChooserParameters&); static PassRefPtrWillBeRawPtr<DateTimeChooserImpl> create(ChromeClientImpl*, DateTimeChooserClient*, const DateTimeChooserParameters&);
virtual ~DateTimeChooserImpl(); virtual ~DateTimeChooserImpl();
virtual void trace(blink::Visitor*) OVERRIDE; virtual void trace(Visitor*) OVERRIDE;
// DateTimeChooser functions: // DateTimeChooser functions:
virtual void endChooser() OVERRIDE; virtual void endChooser() OVERRIDE;
private: private:
DateTimeChooserImpl(ChromeClientImpl*, blink::DateTimeChooserClient*, const blink::DateTimeChooserParameters&); DateTimeChooserImpl(ChromeClientImpl*, DateTimeChooserClient*, const DateTimeChooserParameters&);
// PagePopupClient functions: // PagePopupClient functions:
virtual blink::IntSize contentSize() OVERRIDE; virtual IntSize contentSize() OVERRIDE;
virtual void writeDocument(blink::SharedBuffer*) OVERRIDE; virtual void writeDocument(SharedBuffer*) OVERRIDE;
virtual blink::Locale& locale() OVERRIDE; virtual Locale& locale() OVERRIDE;
virtual void setValueAndClosePopup(int, const String&) OVERRIDE; virtual void setValueAndClosePopup(int, const String&) OVERRIDE;
virtual void setValue(const String&) OVERRIDE; virtual void setValue(const String&) OVERRIDE;
virtual void closePopup() OVERRIDE; virtual void closePopup() OVERRIDE;
virtual void didClosePopup() OVERRIDE; virtual void didClosePopup() OVERRIDE;
ChromeClientImpl* m_chromeClient; ChromeClientImpl* m_chromeClient;
RawPtrWillBeMember<blink::DateTimeChooserClient> m_client; RawPtrWillBeMember<DateTimeChooserClient> m_client;
blink::PagePopup* m_popup; PagePopup* m_popup;
blink::DateTimeChooserParameters m_parameters; DateTimeChooserParameters m_parameters;
OwnPtr<blink::Locale> m_locale; OwnPtr<Locale> m_locale;
}; };
} }
......
...@@ -38,16 +38,13 @@ ...@@ -38,16 +38,13 @@
#include "public/web/WebExternalPopupMenuClient.h" #include "public/web/WebExternalPopupMenuClient.h"
namespace blink { namespace blink {
class FloatQuad; class FloatQuad;
class LocalFrame; class LocalFrame;
class FrameView; class FrameView;
class IntRect; class IntRect;
class IntSize; class IntSize;
class PopupMenuClient; class PopupMenuClient;
}
namespace blink {
class WebExternalPopupMenu; class WebExternalPopupMenu;
class WebViewImpl; class WebViewImpl;
struct WebPopupMenuInfo; struct WebPopupMenuInfo;
...@@ -55,14 +52,14 @@ class WebMouseEvent; ...@@ -55,14 +52,14 @@ class WebMouseEvent;
// The ExternalPopupMenu connects the actual implementation of the popup menu // The ExternalPopupMenu connects the actual implementation of the popup menu
// to the WebCore popup menu. // to the WebCore popup menu.
class ExternalPopupMenu FINAL : public blink::PopupMenu, public WebExternalPopupMenuClient { class ExternalPopupMenu FINAL : public PopupMenu, public WebExternalPopupMenuClient {
public: public:
ExternalPopupMenu(blink::LocalFrame&, blink::PopupMenuClient*, WebViewImpl&); ExternalPopupMenu(LocalFrame&, PopupMenuClient*, WebViewImpl&);
virtual ~ExternalPopupMenu(); virtual ~ExternalPopupMenu();
private: private:
// blink::PopupMenu methods: // PopupMenu methods:
virtual void show(const blink::FloatQuad& controlPosition, const blink::IntSize&, int index) OVERRIDE; virtual void show(const FloatQuad& controlPosition, const IntSize&, int index) OVERRIDE;
virtual void hide() OVERRIDE; virtual void hide() OVERRIDE;
virtual void updateFromElement() OVERRIDE; virtual void updateFromElement() OVERRIDE;
virtual void disconnectClient() OVERRIDE; virtual void disconnectClient() OVERRIDE;
...@@ -73,18 +70,18 @@ private: ...@@ -73,18 +70,18 @@ private:
virtual void didAcceptIndices(const WebVector<int>& indices) OVERRIDE; virtual void didAcceptIndices(const WebVector<int>& indices) OVERRIDE;
virtual void didCancel() OVERRIDE; virtual void didCancel() OVERRIDE;
void dispatchEvent(blink::Timer<ExternalPopupMenu>*); void dispatchEvent(Timer<ExternalPopupMenu>*);
// Fills |info| with the popup menu information contained in the // Fills |info| with the popup menu information contained in the
// blink::PopupMenuClient associated with this ExternalPopupMenu. // PopupMenuClient associated with this ExternalPopupMenu.
void getPopupMenuInfo(WebPopupMenuInfo* info); void getPopupMenuInfo(WebPopupMenuInfo* info);
int toPopupMenuItemIndex(int index); int toPopupMenuItemIndex(int index);
int toExternalPopupMenuItemIndex(int index); int toExternalPopupMenuItemIndex(int index);
blink::PopupMenuClient* m_popupMenuClient; PopupMenuClient* m_popupMenuClient;
RefPtr<blink::FrameView> m_frameView; RefPtr<FrameView> m_frameView;
WebViewImpl& m_webView; WebViewImpl& m_webView;
OwnPtr<WebMouseEvent> m_syntheticEvent; OwnPtr<WebMouseEvent> m_syntheticEvent;
blink::Timer<ExternalPopupMenu> m_dispatchEventTimer; Timer<ExternalPopupMenu> m_dispatchEventTimer;
// The actual implementor of the show menu. // The actual implementor of the show menu.
WebExternalPopupMenu* m_webExternalPopupMenu; WebExternalPopupMenu* m_webExternalPopupMenu;
}; };
......
...@@ -38,11 +38,9 @@ ...@@ -38,11 +38,9 @@
#include "wtf/RefPtr.h" #include "wtf/RefPtr.h"
namespace blink { namespace blink {
class Element; class Element;
class LocalFrame; class LocalFrame;
}
namespace blink {
class WebViewImpl; class WebViewImpl;
class FullscreenController { class FullscreenController {
...@@ -54,8 +52,8 @@ public: ...@@ -54,8 +52,8 @@ public:
void willExitFullScreen(); void willExitFullScreen();
void didExitFullScreen(); void didExitFullScreen();
void enterFullScreenForElement(blink::Element*); void enterFullScreenForElement(Element*);
void exitFullScreenForElement(blink::Element*); void exitFullScreenForElement(Element*);
bool isFullscreen() { return m_fullScreenFrame; } bool isFullscreen() { return m_fullScreenFrame; }
...@@ -66,19 +64,19 @@ private: ...@@ -66,19 +64,19 @@ private:
WebViewImpl* m_webViewImpl; WebViewImpl* m_webViewImpl;
float m_exitFullscreenPageScaleFactor; float m_exitFullscreenPageScaleFactor;
blink::IntSize m_exitFullscreenScrollOffset; IntSize m_exitFullscreenScrollOffset;
blink::FloatPoint m_exitFullscreenPinchViewportOffset; FloatPoint m_exitFullscreenPinchViewportOffset;
// If set, the WebView is transitioning to fullscreen for this element. // If set, the WebView is transitioning to fullscreen for this element.
RefPtrWillBePersistent<blink::Element> m_provisionalFullScreenElement; RefPtrWillBePersistent<Element> m_provisionalFullScreenElement;
// If set, the WebView is in fullscreen mode for an element in this frame. // If set, the WebView is in fullscreen mode for an element in this frame.
RefPtr<blink::LocalFrame> m_fullScreenFrame; RefPtr<LocalFrame> m_fullScreenFrame;
bool m_isCancelingFullScreen; bool m_isCancelingFullScreen;
}; };
} } // namespace blink
#endif #endif
...@@ -31,29 +31,27 @@ ...@@ -31,29 +31,27 @@
#include "public/web/WebGeolocationController.h" #include "public/web/WebGeolocationController.h"
namespace blink { namespace blink {
class GeolocationPosition;
}
namespace blink { class GeolocationPosition;
class WebGeolocationClient; class WebGeolocationClient;
class GeolocationClientProxy FINAL : public blink::GeolocationClient { class GeolocationClientProxy FINAL : public GeolocationClient {
public: public:
GeolocationClientProxy(WebGeolocationClient* client); GeolocationClientProxy(WebGeolocationClient* client);
virtual ~GeolocationClientProxy(); virtual ~GeolocationClientProxy();
void setController(blink::GeolocationController *controller); void setController(GeolocationController*);
virtual void geolocationDestroyed() OVERRIDE; virtual void geolocationDestroyed() OVERRIDE;
virtual void startUpdating() OVERRIDE; virtual void startUpdating() OVERRIDE;
virtual void stopUpdating() OVERRIDE; virtual void stopUpdating() OVERRIDE;
virtual void setEnableHighAccuracy(bool) OVERRIDE; virtual void setEnableHighAccuracy(bool) OVERRIDE;
virtual blink::GeolocationPosition* lastPosition() OVERRIDE; virtual GeolocationPosition* lastPosition() OVERRIDE;
virtual void requestPermission(blink::Geolocation*) OVERRIDE; virtual void requestPermission(Geolocation*) OVERRIDE;
virtual void cancelPermissionRequest(blink::Geolocation*) OVERRIDE; virtual void cancelPermissionRequest(Geolocation*) OVERRIDE;
private: private:
WebGeolocationClient* m_client; WebGeolocationClient* m_client;
blink::Persistent<blink::GeolocationPosition> m_lastPosition; Persistent<GeolocationPosition> m_lastPosition;
}; };
} // namespace blink } // namespace blink
......
...@@ -31,13 +31,13 @@ ...@@ -31,13 +31,13 @@
namespace blink { namespace blink {
class WebViewImpl; class WebViewImpl;
class GraphicsLayerFactoryChromium FINAL : public blink::GraphicsLayerFactory { class GraphicsLayerFactoryChromium FINAL : public GraphicsLayerFactory {
public: public:
explicit GraphicsLayerFactoryChromium(WebViewImpl*); explicit GraphicsLayerFactoryChromium(WebViewImpl*);
virtual ~GraphicsLayerFactoryChromium(); virtual ~GraphicsLayerFactoryChromium();
virtual PassOwnPtr<blink::GraphicsLayer> createGraphicsLayer(blink::GraphicsLayerClient*) OVERRIDE; virtual PassOwnPtr<GraphicsLayer> createGraphicsLayer(GraphicsLayerClient*) OVERRIDE;
private: private:
// The owner of this GraphicsLayerFactoryChromium. // The owner of this GraphicsLayerFactoryChromium.
......
...@@ -42,7 +42,7 @@ class WebDevToolsAgentClient; ...@@ -42,7 +42,7 @@ class WebDevToolsAgentClient;
class WebDevToolsAgentImpl; class WebDevToolsAgentImpl;
class WebViewImpl; class WebViewImpl;
class InspectorClientImpl FINAL : public blink::InspectorClient, public blink::InspectorFrontendChannel { class InspectorClientImpl FINAL : public InspectorClient, public InspectorFrontendChannel {
public: public:
explicit InspectorClientImpl(WebViewImpl*); explicit InspectorClientImpl(WebViewImpl*);
virtual ~InspectorClientImpl(); virtual ~InspectorClientImpl();
...@@ -51,7 +51,7 @@ public: ...@@ -51,7 +51,7 @@ public:
virtual void highlight() OVERRIDE; virtual void highlight() OVERRIDE;
virtual void hideHighlight() OVERRIDE; virtual void hideHighlight() OVERRIDE;
virtual void sendMessageToFrontend(PassRefPtr<blink::JSONObject>) OVERRIDE; virtual void sendMessageToFrontend(PassRefPtr<JSONObject>) OVERRIDE;
virtual void flush() OVERRIDE; virtual void flush() OVERRIDE;
virtual void updateInspectorStateCookie(const WTF::String&) OVERRIDE; virtual void updateInspectorStateCookie(const WTF::String&) OVERRIDE;
...@@ -67,13 +67,13 @@ public: ...@@ -67,13 +67,13 @@ public:
virtual void setContinuousPaintingEnabled(bool) OVERRIDE; virtual void setContinuousPaintingEnabled(bool) OVERRIDE;
virtual void setShowScrollBottleneckRects(bool) OVERRIDE; virtual void setShowScrollBottleneckRects(bool) OVERRIDE;
virtual void resetScrollAndPageScaleFactor() OVERRIDE; virtual void resetScrollAndPageScaleFactor() OVERRIDE;
virtual void showContextMenu(float x, float y, PassRefPtr<blink::ContextMenuProvider>) OVERRIDE; virtual void showContextMenu(float x, float y, PassRefPtr<ContextMenuProvider>) OVERRIDE;
virtual void getAllocatedObjects(HashSet<const void*>&) OVERRIDE; virtual void getAllocatedObjects(HashSet<const void*>&) OVERRIDE;
virtual void dumpUncountedAllocatedObjects(const HashMap<const void*, size_t>&) OVERRIDE; virtual void dumpUncountedAllocatedObjects(const HashMap<const void*, size_t>&) OVERRIDE;
virtual void dispatchKeyEvent(const blink::PlatformKeyboardEvent&) OVERRIDE; virtual void dispatchKeyEvent(const PlatformKeyboardEvent&) OVERRIDE;
virtual void dispatchMouseEvent(const blink::PlatformMouseEvent&) OVERRIDE; virtual void dispatchMouseEvent(const PlatformMouseEvent&) OVERRIDE;
virtual void setTraceEventCallback(const String& categoryFilter, TraceEventCallback) OVERRIDE; virtual void setTraceEventCallback(const String& categoryFilter, TraceEventCallback) OVERRIDE;
virtual void resetTraceEventCallback() OVERRIDE; virtual void resetTraceEventCallback() OVERRIDE;
......
...@@ -35,19 +35,16 @@ ...@@ -35,19 +35,16 @@
#include "wtf/Noncopyable.h" #include "wtf/Noncopyable.h"
namespace blink { namespace blink {
class InspectorFrontendHost; class InspectorFrontendHost;
class Page; class Page;
}
namespace blink {
class WebDevToolsFrontendClient; class WebDevToolsFrontendClient;
class WebDevToolsFrontendImpl; class WebDevToolsFrontendImpl;
class InspectorFrontendClientImpl FINAL : public blink::InspectorFrontendClient { class InspectorFrontendClientImpl FINAL : public InspectorFrontendClient {
WTF_MAKE_NONCOPYABLE(InspectorFrontendClientImpl); WTF_MAKE_NONCOPYABLE(InspectorFrontendClientImpl);
public: public:
InspectorFrontendClientImpl(blink::Page*, WebDevToolsFrontendClient*, WebDevToolsFrontendImpl*); InspectorFrontendClientImpl(Page*, WebDevToolsFrontendClient*, WebDevToolsFrontendImpl*);
virtual ~InspectorFrontendClientImpl(); virtual ~InspectorFrontendClientImpl();
virtual void trace(Visitor*) OVERRIDE; virtual void trace(Visitor*) OVERRIDE;
...@@ -63,9 +60,9 @@ public: ...@@ -63,9 +60,9 @@ public:
virtual void dispose() OVERRIDE; virtual void dispose() OVERRIDE;
private: private:
RawPtrWillBeMember<blink::Page> m_frontendPage; RawPtrWillBeMember<Page> m_frontendPage;
WebDevToolsFrontendClient* m_client; WebDevToolsFrontendClient* m_client;
RefPtrWillBeMember<blink::InspectorFrontendHost> m_frontendHost; RefPtrWillBeMember<InspectorFrontendHost> m_frontendHost;
}; };
} // namespace blink } // namespace blink
......
...@@ -38,20 +38,17 @@ ...@@ -38,20 +38,17 @@
#include "wtf/Vector.h" #include "wtf/Vector.h"
namespace blink { namespace blink {
class RenderLayer; class RenderLayer;
class RenderObject; class RenderObject;
class Node; class Node;
}
namespace blink {
struct WebFloatRect; struct WebFloatRect;
struct WebRect; struct WebRect;
class WebViewImpl; class WebViewImpl;
class LinkHighlight FINAL : public WebContentLayerClient, public WebCompositorAnimationDelegate, blink::LinkHighlightClient { class LinkHighlight FINAL : public WebContentLayerClient, public WebCompositorAnimationDelegate, LinkHighlightClient {
public: public:
static PassOwnPtr<LinkHighlight> create(blink::Node*, WebViewImpl*); static PassOwnPtr<LinkHighlight> create(Node*, WebViewImpl*);
virtual ~LinkHighlight(); virtual ~LinkHighlight();
WebContentLayer* contentLayer(); WebContentLayer* contentLayer();
...@@ -64,35 +61,35 @@ public: ...@@ -64,35 +61,35 @@ public:
WebContentLayerClient::GraphicsContextStatus = GraphicsContextEnabled) OVERRIDE; WebContentLayerClient::GraphicsContextStatus = GraphicsContextEnabled) OVERRIDE;
// WebCompositorAnimationDelegate implementation. // WebCompositorAnimationDelegate implementation.
virtual void notifyAnimationStarted(double monotonicTime, blink::WebCompositorAnimation::TargetProperty) OVERRIDE; virtual void notifyAnimationStarted(double monotonicTime, WebCompositorAnimation::TargetProperty) OVERRIDE;
virtual void notifyAnimationFinished(double monotonicTime, blink::WebCompositorAnimation::TargetProperty) OVERRIDE; virtual void notifyAnimationFinished(double monotonicTime, WebCompositorAnimation::TargetProperty) OVERRIDE;
// LinkHighlightClient inplementation. // LinkHighlightClient inplementation.
virtual void invalidate() OVERRIDE; virtual void invalidate() OVERRIDE;
virtual WebLayer* layer() OVERRIDE; virtual WebLayer* layer() OVERRIDE;
virtual void clearCurrentGraphicsLayer() OVERRIDE; virtual void clearCurrentGraphicsLayer() OVERRIDE;
blink::GraphicsLayer* currentGraphicsLayerForTesting() const { return m_currentGraphicsLayer; } GraphicsLayer* currentGraphicsLayerForTesting() const { return m_currentGraphicsLayer; }
private: private:
LinkHighlight(blink::Node*, WebViewImpl*); LinkHighlight(Node*, WebViewImpl*);
void releaseResources(); void releaseResources();
void computeQuads(blink::Node*, WTF::Vector<blink::FloatQuad>&) const; void computeQuads(Node*, WTF::Vector<FloatQuad>&) const;
blink::RenderLayer* computeEnclosingCompositingLayer(); RenderLayer* computeEnclosingCompositingLayer();
void clearGraphicsLayerLinkHighlightPointer(); void clearGraphicsLayerLinkHighlightPointer();
// This function computes the highlight path, and returns true if it has changed // This function computes the highlight path, and returns true if it has changed
// size since the last call to this function. // size since the last call to this function.
bool computeHighlightLayerPathAndPosition(blink::RenderLayer*); bool computeHighlightLayerPathAndPosition(RenderLayer*);
OwnPtr<WebContentLayer> m_contentLayer; OwnPtr<WebContentLayer> m_contentLayer;
OwnPtr<WebLayer> m_clipLayer; OwnPtr<WebLayer> m_clipLayer;
blink::Path m_path; Path m_path;
RefPtrWillBePersistent<blink::Node> m_node; RefPtrWillBePersistent<Node> m_node;
WebViewImpl* m_owningWebViewImpl; WebViewImpl* m_owningWebViewImpl;
blink::GraphicsLayer* m_currentGraphicsLayer; GraphicsLayer* m_currentGraphicsLayer;
bool m_geometryNeedsUpdate; bool m_geometryNeedsUpdate;
bool m_isAnimating; bool m_isAnimating;
......
...@@ -36,14 +36,14 @@ ...@@ -36,14 +36,14 @@
namespace blink { namespace blink {
class LocalFileSystemClient FINAL : public blink::FileSystemClient { class LocalFileSystemClient FINAL : public FileSystemClient {
public: public:
static PassOwnPtr<FileSystemClient> create(); static PassOwnPtr<FileSystemClient> create();
virtual ~LocalFileSystemClient(); virtual ~LocalFileSystemClient();
virtual bool requestFileSystemAccessSync(blink::ExecutionContext*) OVERRIDE; virtual bool requestFileSystemAccessSync(ExecutionContext*) OVERRIDE;
virtual void requestFileSystemAccessAsync(blink::ExecutionContext*, PassOwnPtr<blink::PermissionCallbacks>) OVERRIDE; virtual void requestFileSystemAccessAsync(ExecutionContext*, PassOwnPtr<PermissionCallbacks>) OVERRIDE;
private: private:
LocalFileSystemClient(); LocalFileSystemClient();
......
...@@ -33,12 +33,10 @@ ...@@ -33,12 +33,10 @@
#include "wtf/PassOwnPtr.h" #include "wtf/PassOwnPtr.h"
namespace blink { namespace blink {
class GraphicsContext; class GraphicsContext;
class GraphicsLayer; class GraphicsLayer;
class GraphicsLayerClient; class GraphicsLayerClient;
}
namespace blink {
class OverlayGraphicsLayerClientImpl; class OverlayGraphicsLayerClientImpl;
class WebPageOverlay; class WebPageOverlay;
class WebViewImpl; class WebViewImpl;
...@@ -58,9 +56,9 @@ public: ...@@ -58,9 +56,9 @@ public:
void clear(); void clear();
void update(); void update();
void paintWebFrame(blink::GraphicsContext&); void paintWebFrame(GraphicsContext&);
blink::GraphicsLayer* graphicsLayer() const { return m_layer.get(); } GraphicsLayer* graphicsLayer() const { return m_layer.get(); }
private: private:
PageOverlay(WebViewImpl*, WebPageOverlay*); PageOverlay(WebViewImpl*, WebPageOverlay*);
...@@ -68,8 +66,8 @@ private: ...@@ -68,8 +66,8 @@ private:
WebViewImpl* m_viewImpl; WebViewImpl* m_viewImpl;
WebPageOverlay* m_overlay; WebPageOverlay* m_overlay;
OwnPtr<blink::GraphicsLayerClient> m_layerClient; OwnPtr<GraphicsLayerClient> m_layerClient;
OwnPtr<blink::GraphicsLayer> m_layer; OwnPtr<GraphicsLayer> m_layer;
int m_zOrder; int m_zOrder;
}; };
......
/* /*
* Copyright (c) 2011, Google Inc. All rights reserved. * Copyright (c) 2011, Google Inc. All rights reserved.
* *
...@@ -37,44 +38,41 @@ ...@@ -37,44 +38,41 @@
#include "web/PopupListBox.h" #include "web/PopupListBox.h"
namespace blink { namespace blink {
class ChromeClient; class ChromeClient;
class FrameView; class FrameView;
class PopupMenuClient; class PopupMenuClient;
}
namespace blink {
struct WebPopupMenuInfo; struct WebPopupMenuInfo;
class PopupContainer FINAL : public blink::FramelessScrollView { class PopupContainer FINAL : public FramelessScrollView {
public: public:
static PassRefPtr<PopupContainer> create(blink::PopupMenuClient*, bool deviceSupportsTouch); static PassRefPtr<PopupContainer> create(PopupMenuClient*, bool deviceSupportsTouch);
// Whether a key event should be sent to this popup. // Whether a key event should be sent to this popup.
bool isInterestedInEventForKey(int keyCode); bool isInterestedInEventForKey(int keyCode);
// FramelessScrollView // FramelessScrollView
virtual void paint(blink::GraphicsContext*, const blink::IntRect&) OVERRIDE; virtual void paint(GraphicsContext*, const IntRect&) OVERRIDE;
virtual void hide() OVERRIDE; virtual void hide() OVERRIDE;
virtual bool handleMouseDownEvent(const blink::PlatformMouseEvent&) OVERRIDE; virtual bool handleMouseDownEvent(const PlatformMouseEvent&) OVERRIDE;
virtual bool handleMouseMoveEvent(const blink::PlatformMouseEvent&) OVERRIDE; virtual bool handleMouseMoveEvent(const PlatformMouseEvent&) OVERRIDE;
virtual bool handleMouseReleaseEvent(const blink::PlatformMouseEvent&) OVERRIDE; virtual bool handleMouseReleaseEvent(const PlatformMouseEvent&) OVERRIDE;
virtual bool handleWheelEvent(const blink::PlatformWheelEvent&) OVERRIDE; virtual bool handleWheelEvent(const PlatformWheelEvent&) OVERRIDE;
virtual bool handleKeyEvent(const blink::PlatformKeyboardEvent&) OVERRIDE; virtual bool handleKeyEvent(const PlatformKeyboardEvent&) OVERRIDE;
virtual bool handleTouchEvent(const blink::PlatformTouchEvent&) OVERRIDE; virtual bool handleTouchEvent(const PlatformTouchEvent&) OVERRIDE;
virtual bool handleGestureEvent(const blink::PlatformGestureEvent&) OVERRIDE; virtual bool handleGestureEvent(const PlatformGestureEvent&) OVERRIDE;
// PopupContainer methods // PopupContainer methods
// Show the popup // Show the popup
void showPopup(blink::FrameView*); void showPopup(FrameView*);
// Show the popup in the specified rect for the specified frame. // Show the popup in the specified rect for the specified frame.
// Note: this code was somehow arbitrarily factored-out of the Popup class // Note: this code was somehow arbitrarily factored-out of the Popup class
// so WebViewImpl can create a PopupContainer. This method is used for // so WebViewImpl can create a PopupContainer. This method is used for
// displaying auto complete popup menus on Mac Chromium, and for all // displaying auto complete popup menus on Mac Chromium, and for all
// popups on other platforms. // popups on other platforms.
void showInRect(const blink::FloatQuad& controlPosition, const blink::IntSize& controlSize, blink::FrameView*, int index); void showInRect(const FloatQuad& controlPosition, const IntSize& controlSize, FrameView*, int index);
// Hides the popup. // Hides the popup.
void hidePopup(); void hidePopup();
...@@ -91,7 +89,7 @@ public: ...@@ -91,7 +89,7 @@ public:
int selectedIndex() const; int selectedIndex() const;
// Refresh the popup values from the PopupMenuClient. // Refresh the popup values from the PopupMenuClient.
blink::IntRect refresh(const blink::IntRect& targetControlRect); IntRect refresh(const IntRect& targetControlRect);
// The menu per-item data. // The menu per-item data.
const Vector<PopupItem*>& popupData() const; const Vector<PopupItem*>& popupData() const;
...@@ -103,36 +101,36 @@ public: ...@@ -103,36 +101,36 @@ public:
int menuItemFontSize() const; int menuItemFontSize() const;
// The style of the menu being used. // The style of the menu being used.
blink::PopupMenuStyle menuStyle() const; PopupMenuStyle menuStyle() const;
// While hovering popup menu window, we want to show tool tip message. // While hovering popup menu window, we want to show tool tip message.
String getSelectedItemToolTip(); String getSelectedItemToolTip();
// This is public for testing. // This is public for testing.
static blink::IntRect layoutAndCalculateWidgetRectInternal(blink::IntRect widgetRectInScreen, int targetControlHeight, const blink::FloatRect& windowRect, const blink::FloatRect& screen, bool isRTL, const int rtlOffset, const int verticalOffset, const blink::IntSize& transformOffset, PopupContent*, bool& needToResizeView); static IntRect layoutAndCalculateWidgetRectInternal(IntRect widgetRectInScreen, int targetControlHeight, const FloatRect& windowRect, const FloatRect& screen, bool isRTL, const int rtlOffset, const int verticalOffset, const IntSize& transformOffset, PopupContent*, bool& needToResizeView);
private: private:
friend class WTF::RefCounted<PopupContainer>; friend class WTF::RefCounted<PopupContainer>;
PopupContainer(blink::PopupMenuClient*, bool deviceSupportsTouch); PopupContainer(PopupMenuClient*, bool deviceSupportsTouch);
virtual ~PopupContainer(); virtual ~PopupContainer();
// Paint the border. // Paint the border.
void paintBorder(blink::GraphicsContext*, const blink::IntRect&); void paintBorder(GraphicsContext*, const IntRect&);
// Layout and calculate popup widget size and location and returns it as IntRect. // Layout and calculate popup widget size and location and returns it as IntRect.
blink::IntRect layoutAndCalculateWidgetRect(int targetControlHeight, const blink::IntSize& transformOffset, const blink::IntPoint& popupInitialCoordinate); IntRect layoutAndCalculateWidgetRect(int targetControlHeight, const IntSize& transformOffset, const IntPoint& popupInitialCoordinate);
void fitToListBox(); void fitToListBox();
void popupOpened(const blink::IntRect& bounds); void popupOpened(const IntRect& bounds);
void getPopupMenuInfo(WebPopupMenuInfo*); void getPopupMenuInfo(WebPopupMenuInfo*);
// Returns the ChromeClient of the page this popup is associated with. // Returns the ChromeClient of the page this popup is associated with.
blink::ChromeClient& chromeClient(); ChromeClient& chromeClient();
RefPtr<PopupListBox> m_listBox; RefPtr<PopupListBox> m_listBox;
RefPtr<blink::FrameView> m_frameView; RefPtr<FrameView> m_frameView;
// m_controlPosition contains the transformed position of the // m_controlPosition contains the transformed position of the
// <select>/<input> associated with this popup. m_controlSize is the size // <select>/<input> associated with this popup. m_controlSize is the size
...@@ -146,8 +144,8 @@ private: ...@@ -146,8 +144,8 @@ private:
// of m_controlPosition (p3) // of m_controlPosition (p3)
// If the popup is positioned up it will align with the top right of // If the popup is positioned up it will align with the top right of
// m_controlPosition (p2) // m_controlPosition (p2)
blink::FloatQuad m_controlPosition; FloatQuad m_controlPosition;
blink::IntSize m_controlSize; IntSize m_controlSize;
// Whether the popup is currently open. // Whether the popup is currently open.
bool m_popupOpen; bool m_popupOpen;
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "wtf/text/WTFString.h" #include "wtf/text/WTFString.h"
namespace blink { namespace blink {
class Font; class Font;
class GraphicsContext; class GraphicsContext;
class IntRect; class IntRect;
...@@ -46,10 +47,6 @@ class PlatformGestureEvent; ...@@ -46,10 +47,6 @@ class PlatformGestureEvent;
class PlatformTouchEvent; class PlatformTouchEvent;
class PlatformWheelEvent; class PlatformWheelEvent;
class PopupMenuClient; class PopupMenuClient;
}
namespace blink {
typedef unsigned long long TimeStamp; typedef unsigned long long TimeStamp;
class PopupContent { class PopupContent {
...@@ -79,7 +76,7 @@ struct PopupItem { ...@@ -79,7 +76,7 @@ struct PopupItem {
String label; String label;
Type type; Type type;
int yOffset; // y offset of this item, relative to the top of the popup. int yOffset; // y offset of this item, relative to the top of the popup.
blink::TextDirection textDirection; TextDirection textDirection;
bool hasTextDirectionOverride; bool hasTextDirectionOverride;
bool enabled; bool enabled;
bool displayNone; bool displayNone;
...@@ -87,25 +84,25 @@ struct PopupItem { ...@@ -87,25 +84,25 @@ struct PopupItem {
// This class uses WebCore code to paint and handle events for a drop-down list // This class uses WebCore code to paint and handle events for a drop-down list
// box ("combobox" on Windows). // box ("combobox" on Windows).
class PopupListBox FINAL : public blink::FramelessScrollView, public PopupContent { class PopupListBox FINAL : public FramelessScrollView, public PopupContent {
public: public:
static PassRefPtr<PopupListBox> create(blink::PopupMenuClient* client, bool deviceSupportsTouch) static PassRefPtr<PopupListBox> create(PopupMenuClient* client, bool deviceSupportsTouch)
{ {
return adoptRef(new PopupListBox(client, deviceSupportsTouch)); return adoptRef(new PopupListBox(client, deviceSupportsTouch));
} }
// FramelessScrollView // FramelessScrollView
virtual void paint(blink::GraphicsContext*, const blink::IntRect&) OVERRIDE; virtual void paint(GraphicsContext*, const IntRect&) OVERRIDE;
virtual bool handleMouseDownEvent(const blink::PlatformMouseEvent&) OVERRIDE; virtual bool handleMouseDownEvent(const PlatformMouseEvent&) OVERRIDE;
virtual bool handleMouseMoveEvent(const blink::PlatformMouseEvent&) OVERRIDE; virtual bool handleMouseMoveEvent(const PlatformMouseEvent&) OVERRIDE;
virtual bool handleMouseReleaseEvent(const blink::PlatformMouseEvent&) OVERRIDE; virtual bool handleMouseReleaseEvent(const PlatformMouseEvent&) OVERRIDE;
virtual bool handleWheelEvent(const blink::PlatformWheelEvent&) OVERRIDE; virtual bool handleWheelEvent(const PlatformWheelEvent&) OVERRIDE;
virtual bool handleKeyEvent(const blink::PlatformKeyboardEvent&) OVERRIDE; virtual bool handleKeyEvent(const PlatformKeyboardEvent&) OVERRIDE;
virtual bool handleTouchEvent(const blink::PlatformTouchEvent&) OVERRIDE; virtual bool handleTouchEvent(const PlatformTouchEvent&) OVERRIDE;
virtual bool handleGestureEvent(const blink::PlatformGestureEvent&) OVERRIDE; virtual bool handleGestureEvent(const PlatformGestureEvent&) OVERRIDE;
// ScrollView // ScrollView
virtual blink::HostWindow* hostWindow() const OVERRIDE; virtual HostWindow* hostWindow() const OVERRIDE;
virtual bool shouldPlaceVerticalScrollbarOnLeft() const OVERRIDE; virtual bool shouldPlaceVerticalScrollbarOnLeft() const OVERRIDE;
// PopupListBox methods // PopupListBox methods
...@@ -166,7 +163,7 @@ private: ...@@ -166,7 +163,7 @@ private:
friend class PopupContainer; friend class PopupContainer;
friend class RefCounted<PopupListBox>; friend class RefCounted<PopupListBox>;
PopupListBox(blink::PopupMenuClient*, bool deviceSupportsTouch); PopupListBox(PopupMenuClient*, bool deviceSupportsTouch);
virtual ~PopupListBox() virtual ~PopupListBox()
{ {
...@@ -199,22 +196,22 @@ private: ...@@ -199,22 +196,22 @@ private:
void invalidateRow(int index); void invalidateRow(int index);
// Get the bounds of a row. // Get the bounds of a row.
blink::IntRect getRowBounds(int index); IntRect getRowBounds(int index);
// Converts a point to an index of the row the point is over // Converts a point to an index of the row the point is over
int pointToRowIndex(const blink::IntPoint&); int pointToRowIndex(const IntPoint&);
// Paint an individual row // Paint an individual row
void paintRow(blink::GraphicsContext*, const blink::IntRect&, int rowIndex); void paintRow(GraphicsContext*, const IntRect&, int rowIndex);
// Test if the given point is within the bounds of the popup window. // Test if the given point is within the bounds of the popup window.
bool isPointInBounds(const blink::IntPoint&); bool isPointInBounds(const IntPoint&);
// Called when the user presses a text key. Does a prefix-search of the items. // Called when the user presses a text key. Does a prefix-search of the items.
void typeAheadFind(const blink::PlatformKeyboardEvent&); void typeAheadFind(const PlatformKeyboardEvent&);
// Returns the font to use for the given row // Returns the font to use for the given row
blink::Font getRowFont(int index); Font getRowFont(int index);
// Moves the selection down/up one item, taking care of looping back to the // Moves the selection down/up one item, taking care of looping back to the
// first/last element if m_loopSelectionNavigation is true. // first/last element if m_loopSelectionNavigation is true.
...@@ -255,14 +252,14 @@ private: ...@@ -255,14 +252,14 @@ private:
Vector<PopupItem*> m_items; Vector<PopupItem*> m_items;
// The <select> PopupMenuClient that opened us. // The <select> PopupMenuClient that opened us.
blink::PopupMenuClient* m_popupClient; PopupMenuClient* m_popupClient;
// The scrollbar which has mouse capture. Mouse events go straight to this // The scrollbar which has mouse capture. Mouse events go straight to this
// if not null. // if not null.
RefPtr<blink::Scrollbar> m_capturingScrollbar; RefPtr<Scrollbar> m_capturingScrollbar;
// The last scrollbar that the mouse was over. Used for mouseover highlights. // The last scrollbar that the mouse was over. Used for mouseover highlights.
RefPtr<blink::Scrollbar> m_lastScrollbarUnderMouse; RefPtr<Scrollbar> m_lastScrollbarUnderMouse;
// The string the user has typed so far into the popup. Used for typeAheadFind. // The string the user has typed so far into the popup. Used for typeAheadFind.
String m_typedString; String m_typedString;
...@@ -277,7 +274,7 @@ private: ...@@ -277,7 +274,7 @@ private:
int m_maxWindowWidth; int m_maxWindowWidth;
// To forward last mouse release event. // To forward last mouse release event.
RefPtrWillBePersistent<blink::Element> m_focusedElement; RefPtrWillBePersistent<Element> m_focusedElement;
}; };
} // namespace blink } // namespace blink
......
...@@ -35,28 +35,25 @@ ...@@ -35,28 +35,25 @@
#include "wtf/RefPtr.h" #include "wtf/RefPtr.h"
namespace blink { namespace blink {
class LocalFrame; class LocalFrame;
class FrameView; class FrameView;
class PopupMenuClient;
}
namespace blink {
class PopupContainer; class PopupContainer;
class PopupMenuClient;
class PopupMenuChromium FINAL : public blink::PopupMenu { class PopupMenuChromium FINAL : public PopupMenu {
public: public:
PopupMenuChromium(blink::LocalFrame&, blink::PopupMenuClient*); PopupMenuChromium(LocalFrame&, PopupMenuClient*);
virtual ~PopupMenuChromium(); virtual ~PopupMenuChromium();
virtual void show(const blink::FloatQuad& controlPosition, const blink::IntSize& controlSize, int index) OVERRIDE; virtual void show(const FloatQuad& controlPosition, const IntSize& controlSize, int index) OVERRIDE;
virtual void hide() OVERRIDE; virtual void hide() OVERRIDE;
virtual void updateFromElement() OVERRIDE; virtual void updateFromElement() OVERRIDE;
virtual void disconnectClient() OVERRIDE; virtual void disconnectClient() OVERRIDE;
private: private:
blink::PopupMenuClient* m_popupClient; PopupMenuClient* m_popupClient;
RefPtr<blink::FrameView> m_frameView; RefPtr<FrameView> m_frameView;
RefPtr<PopupContainer> m_popup; RefPtr<PopupContainer> m_popup;
}; };
......
...@@ -30,56 +30,53 @@ ...@@ -30,56 +30,53 @@
#include "wtf/RefPtr.h" #include "wtf/RefPtr.h"
namespace blink {
class FrameView;
}
namespace blink { namespace blink {
class FrameView;
class WebPluginScrollbarImpl; class WebPluginScrollbarImpl;
class ScrollbarGroup FINAL : public blink::ScrollableArea { class ScrollbarGroup FINAL : public ScrollableArea {
public: public:
ScrollbarGroup(blink::FrameView*, const blink::IntRect& frameRect); ScrollbarGroup(FrameView*, const IntRect& frameRect);
virtual ~ScrollbarGroup(); virtual ~ScrollbarGroup();
void scrollbarCreated(WebPluginScrollbarImpl*); void scrollbarCreated(WebPluginScrollbarImpl*);
void scrollbarDestroyed(WebPluginScrollbarImpl*); void scrollbarDestroyed(WebPluginScrollbarImpl*);
void setLastMousePosition(const blink::IntPoint&); void setLastMousePosition(const IntPoint&);
void setFrameRect(const blink::IntRect&); void setFrameRect(const IntRect&);
// blink::ScrollableArea methods // ScrollableArea methods
virtual int scrollSize(blink::ScrollbarOrientation) const OVERRIDE; virtual int scrollSize(ScrollbarOrientation) const OVERRIDE;
virtual void setScrollOffset(const blink::IntPoint&) OVERRIDE; virtual void setScrollOffset(const IntPoint&) OVERRIDE;
virtual void invalidateScrollbarRect(blink::Scrollbar*, const blink::IntRect&) OVERRIDE; virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE;
virtual void invalidateScrollCornerRect(const blink::IntRect&) OVERRIDE; virtual void invalidateScrollCornerRect(const IntRect&) OVERRIDE;
virtual bool isActive() const OVERRIDE; virtual bool isActive() const OVERRIDE;
virtual blink::IntRect scrollCornerRect() const OVERRIDE { return blink::IntRect(); } virtual IntRect scrollCornerRect() const OVERRIDE { return IntRect(); }
virtual bool isScrollCornerVisible() const OVERRIDE; virtual bool isScrollCornerVisible() const OVERRIDE;
virtual void getTickmarks(Vector<blink::IntRect>&) const OVERRIDE; virtual void getTickmarks(Vector<IntRect>&) const OVERRIDE;
virtual blink::IntPoint convertFromContainingViewToScrollbar(const blink::Scrollbar*, const blink::IntPoint& parentPoint) const OVERRIDE; virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, const IntPoint& parentPoint) const OVERRIDE;
virtual blink::Scrollbar* horizontalScrollbar() const OVERRIDE; virtual Scrollbar* horizontalScrollbar() const OVERRIDE;
virtual blink::Scrollbar* verticalScrollbar() const OVERRIDE; virtual Scrollbar* verticalScrollbar() const OVERRIDE;
virtual blink::IntPoint scrollPosition() const OVERRIDE; virtual IntPoint scrollPosition() const OVERRIDE;
virtual blink::IntPoint minimumScrollPosition() const OVERRIDE; virtual IntPoint minimumScrollPosition() const OVERRIDE;
virtual blink::IntPoint maximumScrollPosition() const OVERRIDE; virtual IntPoint maximumScrollPosition() const OVERRIDE;
virtual int visibleHeight() const OVERRIDE; virtual int visibleHeight() const OVERRIDE;
virtual int visibleWidth() const OVERRIDE; virtual int visibleWidth() const OVERRIDE;
virtual blink::IntSize contentsSize() const OVERRIDE; virtual IntSize contentsSize() const OVERRIDE;
virtual blink::IntSize overhangAmount() const OVERRIDE; virtual IntSize overhangAmount() const OVERRIDE;
virtual blink::IntPoint lastKnownMousePosition() const OVERRIDE; virtual IntPoint lastKnownMousePosition() const OVERRIDE;
virtual bool shouldSuspendScrollAnimations() const OVERRIDE; virtual bool shouldSuspendScrollAnimations() const OVERRIDE;
virtual void scrollbarStyleChanged() OVERRIDE; virtual void scrollbarStyleChanged() OVERRIDE;
virtual bool scrollbarsCanBeActive() const OVERRIDE; virtual bool scrollbarsCanBeActive() const OVERRIDE;
virtual blink::IntRect scrollableAreaBoundingBox() const OVERRIDE; virtual IntRect scrollableAreaBoundingBox() const OVERRIDE;
virtual bool userInputScrollable(blink::ScrollbarOrientation) const OVERRIDE; virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE;
virtual bool shouldPlaceVerticalScrollbarOnLeft() const OVERRIDE; virtual bool shouldPlaceVerticalScrollbarOnLeft() const OVERRIDE;
virtual int pageStep(blink::ScrollbarOrientation) const OVERRIDE; virtual int pageStep(ScrollbarOrientation) const OVERRIDE;
private: private:
blink::FrameView* m_frameView; FrameView* m_frameView;
blink::IntPoint m_lastMousePosition; IntPoint m_lastMousePosition;
blink::IntRect m_frameRect; IntRect m_frameRect;
WebPluginScrollbarImpl* m_horizontalScrollbar; WebPluginScrollbarImpl* m_horizontalScrollbar;
WebPluginScrollbarImpl* m_verticalScrollbar; WebPluginScrollbarImpl* m_verticalScrollbar;
}; };
......
...@@ -40,10 +40,10 @@ namespace blink { ...@@ -40,10 +40,10 @@ namespace blink {
class WebServiceWorkerContextClient; class WebServiceWorkerContextClient;
class WebURL; class WebURL;
class ServiceWorkerGlobalScopeClientImpl FINAL : public NoBaseWillBeGarbageCollectedFinalized<ServiceWorkerGlobalScopeClientImpl>, public blink::ServiceWorkerGlobalScopeClient { class ServiceWorkerGlobalScopeClientImpl FINAL : public NoBaseWillBeGarbageCollectedFinalized<ServiceWorkerGlobalScopeClientImpl>, public ServiceWorkerGlobalScopeClient {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerGlobalScopeClientImpl); WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerGlobalScopeClientImpl);
public: public:
static PassOwnPtrWillBeRawPtr<blink::ServiceWorkerGlobalScopeClient> create(WebServiceWorkerContextClient&); static PassOwnPtrWillBeRawPtr<ServiceWorkerGlobalScopeClient> create(WebServiceWorkerContextClient&);
virtual ~ServiceWorkerGlobalScopeClientImpl(); virtual ~ServiceWorkerGlobalScopeClientImpl();
virtual void getClients(WebServiceWorkerClientsCallbacks*); virtual void getClients(WebServiceWorkerClientsCallbacks*);
...@@ -52,11 +52,11 @@ public: ...@@ -52,11 +52,11 @@ public:
virtual void didHandleActivateEvent(int eventID, WebServiceWorkerEventResult) OVERRIDE; virtual void didHandleActivateEvent(int eventID, WebServiceWorkerEventResult) OVERRIDE;
virtual void didHandleInstallEvent(int installEventID, WebServiceWorkerEventResult) OVERRIDE; virtual void didHandleInstallEvent(int installEventID, WebServiceWorkerEventResult) OVERRIDE;
virtual void didHandleFetchEvent(int fetchEventID, PassRefPtrWillBeRawPtr<blink::Response>) OVERRIDE; virtual void didHandleFetchEvent(int fetchEventID, PassRefPtrWillBeRawPtr<Response>) OVERRIDE;
virtual void didHandleSyncEvent(int syncEventID) OVERRIDE; virtual void didHandleSyncEvent(int syncEventID) OVERRIDE;
virtual void postMessageToClient(int clientID, const WebString& message, PassOwnPtr<WebMessagePortChannelArray>) OVERRIDE; virtual void postMessageToClient(int clientID, const WebString& message, PassOwnPtr<WebMessagePortChannelArray>) OVERRIDE;
virtual void trace(blink::Visitor* visitor) OVERRIDE { blink::ServiceWorkerGlobalScopeClient::trace(visitor); } virtual void trace(Visitor* visitor) OVERRIDE { ServiceWorkerGlobalScopeClient::trace(visitor); }
private: private:
explicit ServiceWorkerGlobalScopeClientImpl(WebServiceWorkerContextClient&); explicit ServiceWorkerGlobalScopeClientImpl(WebServiceWorkerContextClient&);
......
...@@ -40,7 +40,7 @@ namespace blink { ...@@ -40,7 +40,7 @@ namespace blink {
class WebSharedWorkerRepositoryClient; class WebSharedWorkerRepositoryClient;
class SharedWorkerRepositoryClientImpl FINAL : public blink::SharedWorkerRepositoryClient { class SharedWorkerRepositoryClientImpl FINAL : public SharedWorkerRepositoryClient {
WTF_MAKE_NONCOPYABLE(SharedWorkerRepositoryClientImpl); WTF_MAKE_NONCOPYABLE(SharedWorkerRepositoryClientImpl);
public: public:
static PassOwnPtr<SharedWorkerRepositoryClientImpl> create(WebSharedWorkerRepositoryClient* client) static PassOwnPtr<SharedWorkerRepositoryClientImpl> create(WebSharedWorkerRepositoryClient* client)
...@@ -50,8 +50,8 @@ public: ...@@ -50,8 +50,8 @@ public:
virtual ~SharedWorkerRepositoryClientImpl() { } virtual ~SharedWorkerRepositoryClientImpl() { }
virtual void connect(PassRefPtrWillBeRawPtr<blink::SharedWorker>, PassOwnPtr<WebMessagePortChannel>, const blink::KURL&, const String& name, blink::ExceptionState&) OVERRIDE; virtual void connect(PassRefPtrWillBeRawPtr<SharedWorker>, PassOwnPtr<WebMessagePortChannel>, const KURL&, const String& name, ExceptionState&) OVERRIDE;
virtual void documentDetached(blink::Document*) OVERRIDE; virtual void documentDetached(Document*) OVERRIDE;
private: private:
explicit SharedWorkerRepositoryClientImpl(WebSharedWorkerRepositoryClient*); explicit SharedWorkerRepositoryClientImpl(WebSharedWorkerRepositoryClient*);
......
...@@ -35,14 +35,12 @@ ...@@ -35,14 +35,12 @@
#include "platform/text/TextCheckerClient.h" #include "platform/text/TextCheckerClient.h"
namespace blink { namespace blink {
class LocalFrame; class LocalFrame;
class HTMLInputElement; class HTMLInputElement;
}
namespace blink {
class WebViewImpl; class WebViewImpl;
class SpellCheckerClientImpl FINAL : public blink::SpellCheckerClient, public blink::TextCheckerClient { class SpellCheckerClientImpl FINAL : public SpellCheckerClient, public TextCheckerClient {
public: public:
explicit SpellCheckerClientImpl(WebViewImpl*); explicit SpellCheckerClientImpl(WebViewImpl*);
...@@ -51,17 +49,17 @@ public: ...@@ -51,17 +49,17 @@ public:
virtual bool isContinuousSpellCheckingEnabled() OVERRIDE; virtual bool isContinuousSpellCheckingEnabled() OVERRIDE;
virtual void toggleContinuousSpellChecking() OVERRIDE; virtual void toggleContinuousSpellChecking() OVERRIDE;
virtual bool isGrammarCheckingEnabled() OVERRIDE; virtual bool isGrammarCheckingEnabled() OVERRIDE;
virtual bool shouldEraseMarkersAfterChangeSelection(blink::TextCheckingType) const OVERRIDE; virtual bool shouldEraseMarkersAfterChangeSelection(TextCheckingType) const OVERRIDE;
virtual void checkSpellingOfString(const String&, int* misspellingLocation, int* misspellingLength) OVERRIDE; virtual void checkSpellingOfString(const String&, int* misspellingLocation, int* misspellingLength) OVERRIDE;
virtual void checkGrammarOfString(const String&, WTF::Vector<blink::GrammarDetail>&, virtual void checkGrammarOfString(const String&, WTF::Vector<GrammarDetail>&,
int* badGrammarLocation, int* badGrammarLength) OVERRIDE; int* badGrammarLocation, int* badGrammarLength) OVERRIDE;
virtual WTF::String getAutoCorrectSuggestionForMisspelledWord(const WTF::String&) OVERRIDE; virtual WTF::String getAutoCorrectSuggestionForMisspelledWord(const WTF::String&) OVERRIDE;
virtual void updateSpellingUIWithMisspelledWord(const WTF::String&) OVERRIDE; virtual void updateSpellingUIWithMisspelledWord(const WTF::String&) OVERRIDE;
virtual void showSpellingUI(bool show) OVERRIDE; virtual void showSpellingUI(bool show) OVERRIDE;
virtual bool spellingUIIsShowing() OVERRIDE; virtual bool spellingUIIsShowing() OVERRIDE;
virtual void requestCheckingOfString(WTF::PassRefPtr<blink::TextCheckingRequest>) OVERRIDE; virtual void requestCheckingOfString(WTF::PassRefPtr<TextCheckingRequest>) OVERRIDE;
virtual blink::TextCheckerClient& textChecker() OVERRIDE { return *this; } virtual TextCheckerClient& textChecker() OVERRIDE { return *this; }
private: private:
// Returns whether or not the focused control needs spell-checking. // Returns whether or not the focused control needs spell-checking.
......
...@@ -11,12 +11,12 @@ namespace blink { ...@@ -11,12 +11,12 @@ namespace blink {
class WebViewImpl; class WebViewImpl;
class StorageClientImpl : public blink::StorageClient { class StorageClientImpl : public StorageClient {
public: public:
explicit StorageClientImpl(WebViewImpl*); explicit StorageClientImpl(WebViewImpl*);
virtual PassOwnPtr<blink::StorageNamespace> createSessionStorageNamespace() OVERRIDE; virtual PassOwnPtr<StorageNamespace> createSessionStorageNamespace() OVERRIDE;
virtual bool canAccessStorage(blink::LocalFrame*, blink::StorageType) const OVERRIDE; virtual bool canAccessStorage(LocalFrame*, StorageType) const OVERRIDE;
private: private:
WebViewImpl* m_webView; WebViewImpl* m_webView;
......
...@@ -36,17 +36,17 @@ ...@@ -36,17 +36,17 @@
namespace blink { namespace blink {
class StorageQuotaClientImpl : public NoBaseWillBeGarbageCollectedFinalized<StorageQuotaClientImpl>, public blink::StorageQuotaClient { class StorageQuotaClientImpl : public NoBaseWillBeGarbageCollectedFinalized<StorageQuotaClientImpl>, public StorageQuotaClient {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(StorageQuotaClientImpl); WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(StorageQuotaClientImpl);
public: public:
static PassOwnPtrWillBeRawPtr<StorageQuotaClientImpl> create(); static PassOwnPtrWillBeRawPtr<StorageQuotaClientImpl> create();
virtual ~StorageQuotaClientImpl(); virtual ~StorageQuotaClientImpl();
virtual void requestQuota(blink::ExecutionContext*, WebStorageQuotaType, unsigned long long newQuotaInBytes, PassOwnPtr<blink::StorageQuotaCallback>, PassOwnPtr<blink::StorageErrorCallback>) OVERRIDE; virtual void requestQuota(ExecutionContext*, WebStorageQuotaType, unsigned long long newQuotaInBytes, PassOwnPtr<StorageQuotaCallback>, PassOwnPtr<StorageErrorCallback>) OVERRIDE;
virtual blink::ScriptPromise requestPersistentQuota(blink::ScriptState*, unsigned long long newQuotaInBytes) OVERRIDE; virtual ScriptPromise requestPersistentQuota(ScriptState*, unsigned long long newQuotaInBytes) OVERRIDE;
virtual void trace(blink::Visitor* visitor) OVERRIDE { blink::StorageQuotaClient::trace(visitor); } virtual void trace(Visitor* visitor) OVERRIDE { StorageQuotaClient::trace(visitor); }
private: private:
StorageQuotaClientImpl(); StorageQuotaClientImpl();
......
...@@ -44,10 +44,8 @@ ...@@ -44,10 +44,8 @@
#include "wtf/text/WTFString.h" #include "wtf/text/WTFString.h"
namespace blink { namespace blink {
class Range;
}
namespace blink { class Range;
class WebLocalFrameImpl; class WebLocalFrameImpl;
template <typename T> class WebVector; template <typename T> class WebVector;
...@@ -78,7 +76,7 @@ public: ...@@ -78,7 +76,7 @@ public:
// Returns the active match in the current frame. Could be a null range if // Returns the active match in the current frame. Could be a null range if
// the local frame has no active match. // the local frame has no active match.
blink::Range* activeMatch() const { return m_activeMatch.get(); } Range* activeMatch() const { return m_activeMatch.get(); }
void flushCurrentScoping(); void flushCurrentScoping();
...@@ -93,18 +91,18 @@ public: ...@@ -93,18 +91,18 @@ public:
class FindMatch { class FindMatch {
ALLOW_ONLY_INLINE_ALLOCATION(); ALLOW_ONLY_INLINE_ALLOCATION();
public: public:
RefPtrWillBeMember<blink::Range> m_range; RefPtrWillBeMember<Range> m_range;
// 1-based index within this frame. // 1-based index within this frame.
int m_ordinal; int m_ordinal;
// In find-in-page coordinates. // In find-in-page coordinates.
// Lazily calculated by updateFindMatchRects. // Lazily calculated by updateFindMatchRects.
blink::FloatRect m_rect; FloatRect m_rect;
FindMatch(PassRefPtrWillBeRawPtr<blink::Range>, int ordinal); FindMatch(PassRefPtrWillBeRawPtr<Range>, int ordinal);
void trace(blink::Visitor*); void trace(Visitor*);
}; };
private: private:
...@@ -127,7 +125,7 @@ private: ...@@ -127,7 +125,7 @@ private:
// Return the index in the find-in-page cache of the match closest to the // Return the index in the find-in-page cache of the match closest to the
// provided point in find-in-page coordinates, or -1 in case of error. // provided point in find-in-page coordinates, or -1 in case of error.
// The squared distance to the closest match is returned in the distanceSquared parameter. // The squared distance to the closest match is returned in the distanceSquared parameter.
int nearestFindMatch(const blink::FloatPoint&, float& distanceSquared); int nearestFindMatch(const FloatPoint&, float& distanceSquared);
// Select a find-in-page match marker in the current frame using a cache // Select a find-in-page match marker in the current frame using a cache
// match index returned by nearestFindMatch. Returns the ordinal of the new // match index returned by nearestFindMatch. Returns the ordinal of the new
...@@ -144,10 +142,10 @@ private: ...@@ -144,10 +142,10 @@ private:
void appendFindMatchRects(Vector<WebFloatRect>& frameRects); void appendFindMatchRects(Vector<WebFloatRect>& frameRects);
// Add a WebKit TextMatch-highlight marker to nodes in a range. // Add a WebKit TextMatch-highlight marker to nodes in a range.
void addMarker(blink::Range*, bool activeMatch); void addMarker(Range*, bool activeMatch);
// Sets the markers within a range as active or inactive. // Sets the markers within a range as active or inactive.
void setMarkerActive(blink::Range*, bool active); void setMarkerActive(Range*, bool active);
// Returns the ordinal of the first match in the frame specified. This // Returns the ordinal of the first match in the frame specified. This
// function enumerates the frames, starting with the main frame and up to (but // function enumerates the frames, starting with the main frame and up to (but
...@@ -197,7 +195,7 @@ private: ...@@ -197,7 +195,7 @@ private:
WebLocalFrameImpl* m_currentActiveMatchFrame; WebLocalFrameImpl* m_currentActiveMatchFrame;
// The range of the active match for the current frame. // The range of the active match for the current frame.
RefPtrWillBePersistent<blink::Range> m_activeMatch; RefPtrWillBePersistent<Range> m_activeMatch;
// The index of the active match for the current frame. // The index of the active match for the current frame.
int m_activeMatchIndexInCurrentFrame; int m_activeMatchIndexInCurrentFrame;
...@@ -207,7 +205,7 @@ private: ...@@ -207,7 +205,7 @@ private:
// //
// This range is collapsed to the start position of the last successful // This range is collapsed to the start position of the last successful
// search; the new search should start from the next adjacent position. // search; the new search should start from the next adjacent position.
RefPtrWillBePersistent<blink::Range> m_resumeScopingFromRange; RefPtrWillBePersistent<Range> m_resumeScopingFromRange;
// Keeps track of the last string this frame searched for. This is used for // Keeps track of the last string this frame searched for. This is used for
// short-circuiting searches in the following scenarios: When a frame has // short-circuiting searches in the following scenarios: When a frame has
...@@ -250,7 +248,7 @@ private: ...@@ -250,7 +248,7 @@ private:
// Contents size when find-in-page match rects were last computed for this // Contents size when find-in-page match rects were last computed for this
// frame's cache. // frame's cache.
blink::IntSize m_contentsSizeForCurrentFindMatchRects; IntSize m_contentsSizeForCurrentFindMatchRects;
// This flag is used by the scoping effort to determine if we need to figure // This flag is used by the scoping effort to determine if we need to figure
// out which rectangle is the active match. Once we find the active // out which rectangle is the active match. Once we find the active
......
...@@ -39,12 +39,10 @@ ...@@ -39,12 +39,10 @@
#include "wtf/RefCounted.h" #include "wtf/RefCounted.h"
namespace blink { namespace blink {
class EventHandler; class EventHandler;
class IntSize; class IntSize;
class Node; class Node;
}
namespace blink {
// ViewportAnchor provides a way to anchor a viewport origin to a DOM node. // ViewportAnchor provides a way to anchor a viewport origin to a DOM node.
// In particular, the user supplies the current viewport (in CSS coordinates) // In particular, the user supplies the current viewport (in CSS coordinates)
...@@ -56,22 +54,22 @@ namespace blink { ...@@ -56,22 +54,22 @@ namespace blink {
class ViewportAnchor { class ViewportAnchor {
STACK_ALLOCATED(); STACK_ALLOCATED();
public: public:
explicit ViewportAnchor(blink::EventHandler* eventHandler); explicit ViewportAnchor(EventHandler*);
void setAnchor(const blink::IntRect& viewRect, const blink::FloatSize& anchorInViewCoords); void setAnchor(const IntRect& viewRect, const FloatSize& anchorInViewCoords);
blink::IntPoint computeOrigin(const blink::IntSize& currentViewSize) const; IntPoint computeOrigin(const IntSize& currentViewSize) const;
private: private:
RawPtrWillBeMember<blink::EventHandler> m_eventHandler; RawPtrWillBeMember<EventHandler> m_eventHandler;
blink::IntRect m_viewRect; IntRect m_viewRect;
RefPtrWillBeMember<blink::Node> m_anchorNode; RefPtrWillBeMember<Node> m_anchorNode;
blink::LayoutRect m_anchorNodeBounds; LayoutRect m_anchorNodeBounds;
blink::FloatSize m_anchorInViewCoords; FloatSize m_anchorInViewCoords;
blink::FloatSize m_anchorInNodeCoords; FloatSize m_anchorInNodeCoords;
}; };
} // namespace blink } // namespace blink
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment