| Index: content/renderer/render_view_impl.h
|
| ===================================================================
|
| --- content/renderer/render_view_impl.h (revision 163045)
|
| +++ content/renderer/render_view_impl.h (working copy)
|
| @@ -5,11 +5,7 @@
|
| #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
|
| #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
|
|
|
| -#include <deque>
|
| -#include <map>
|
| #include <set>
|
| -#include <string>
|
| -#include <vector>
|
|
|
| #include "base/basictypes.h"
|
| #include "base/gtest_prod_util.h"
|
| @@ -46,7 +42,6 @@
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializerClient.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityState.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
|
| -#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSystem.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsContext3D.h"
|
| @@ -68,58 +63,18 @@
|
| #endif
|
|
|
| class CommandLine;
|
| -class DeviceOrientationDispatcher;
|
| -class DevToolsAgent;
|
| class DomAutomationController;
|
| -class ExternalPopupMenu;
|
| -class GeolocationDispatcher;
|
| -class GURL;
|
| class JavaBridgeDispatcher;
|
| -class LoadProgressTracker;
|
| -class MediaStreamDispatcher;
|
| -class MediaStreamImpl;
|
| -class MouseLockDispatcher;
|
| -class NotificationProvider;
|
| class PepperDeviceTest;
|
| -struct PP_NetAddress_Private;
|
| -class RenderWidgetFullscreenPepper;
|
| -class RendererWebColorChooserImpl;
|
| class SkBitmap;
|
| -class InputTagSpeechDispatcher;
|
| -class SpeechRecognitionDispatcher;
|
| +class WebUIBindings;
|
| +struct PP_NetAddress_Private;
|
| struct ViewMsg_Navigate_Params;
|
| struct ViewMsg_PostMessage_Params;
|
| struct ViewMsg_StopFinding_Params;
|
| struct ViewMsg_SwapOut_Params;
|
| struct WebDropData;
|
| -class WebIntentsHost;
|
| -class WebPluginDelegateProxy;
|
| -class WebUIBindings;
|
|
|
| -namespace content {
|
| -class DocumentState;
|
| -class NavigationState;
|
| -class RenderViewObserver;
|
| -class RenderViewTest;
|
| -class RendererAccessibility;
|
| -class RendererPpapiHost;
|
| -#if defined(OS_ANDROID)
|
| -class WebMediaPlayerProxyImplAndroid;
|
| -#endif
|
| -struct CustomContextMenuContext;
|
| -struct FileChooserParams;
|
| -
|
| -namespace old {
|
| -class GuestToEmbedderChannel;
|
| -}
|
| -
|
| -} // namespace content
|
| -
|
| -namespace gfx {
|
| -class Point;
|
| -class Rect;
|
| -} // namespace gfx
|
| -
|
| namespace ui {
|
| struct SelectedFileInfo;
|
| } // namespace ui
|
| @@ -154,9 +109,6 @@
|
| class WebDragData;
|
| class WebGeolocationClient;
|
| class WebGestureEvent;
|
| -#if defined(OS_ANDROID)
|
| -class WebHitTestResult;
|
| -#endif
|
| class WebIconURL;
|
| class WebImage;
|
| class WebPeerConnection00Handler;
|
| @@ -181,8 +133,45 @@
|
| struct WebPluginAction;
|
| struct WebPoint;
|
| struct WebWindowFeatures;
|
| +
|
| +#if defined(OS_ANDROID)
|
| +class WebHitTestResult;
|
| +#endif
|
| }
|
|
|
| +namespace content {
|
| +class DeviceOrientationDispatcher;
|
| +class DevToolsAgent;
|
| +class DocumentState;
|
| +class ExternalPopupMenu;
|
| +class GeolocationDispatcher;
|
| +class InputTagSpeechDispatcher;
|
| +class LoadProgressTracker;
|
| +class MediaStreamDispatcher;
|
| +class MediaStreamImpl;
|
| +class MouseLockDispatcher;
|
| +class NavigationState;
|
| +class NotificationProvider;
|
| +class RenderViewObserver;
|
| +class RenderViewTest;
|
| +class RendererAccessibility;
|
| +class RendererPpapiHost;
|
| +class RendererWebColorChooserImpl;
|
| +class RenderWidgetFullscreenPepper;
|
| +class SpeechRecognitionDispatcher;
|
| +class WebIntentsHost;
|
| +class WebPluginDelegateProxy;
|
| +struct CustomContextMenuContext;
|
| +struct FileChooserParams;
|
| +
|
| +#if defined(OS_ANDROID)
|
| +class WebMediaPlayerProxyImplAndroid;
|
| +#endif
|
| +
|
| +namespace old {
|
| +class GuestToEmbedderChannel;
|
| +}
|
| +
|
| // We need to prevent a page from trying to create infinite popups. It is not
|
| // as simple as keeping a count of the number of immediate children
|
| // popups. Having an html file that window.open()s itself would create
|
| @@ -205,7 +194,7 @@
|
| public WebKit::WebViewClient,
|
| public WebKit::WebFrameClient,
|
| public WebKit::WebPageSerializerClient,
|
| - public content::RenderView,
|
| + public RenderView,
|
| public webkit::npapi::WebPluginPageDelegate,
|
| public webkit_media::WebMediaPlayerDelegate,
|
| public WebGraphicsContext3DSwapBuffersClient,
|
| @@ -220,7 +209,7 @@
|
| CONTENT_EXPORT static RenderViewImpl* Create(
|
| gfx::NativeViewId parent_hwnd,
|
| int32 opener_id,
|
| - const content::RendererPreferences& renderer_prefs,
|
| + const RendererPreferences& renderer_prefs,
|
| const webkit_glue::WebPreferences& webkit_prefs,
|
| SharedRenderViewCounter* counter,
|
| int32 routing_id,
|
| @@ -231,7 +220,7 @@
|
| bool swapped_out,
|
| int32 next_page_id,
|
| const WebKit::WebScreenInfo& screen_info,
|
| - content::old::GuestToEmbedderChannel* guest_to_embedder_channel,
|
| + old::GuestToEmbedderChannel* guest_to_embedder_channel,
|
| AccessibilityMode accessibility_mode);
|
|
|
| // Returns the RenderViewImpl containing the given WebView.
|
| @@ -277,8 +266,8 @@
|
| #endif
|
|
|
| // Functions to add and remove observers for this object.
|
| - void AddObserver(content::RenderViewObserver* observer);
|
| - void RemoveObserver(content::RenderViewObserver* observer);
|
| + void AddObserver(RenderViewObserver* observer);
|
| + void RemoveObserver(RenderViewObserver* observer);
|
|
|
| // Adds the given file chooser request to the file_chooser_completion_ queue
|
| // (see that var for more) and requests the chooser be displayed if there are
|
| @@ -286,14 +275,14 @@
|
| //
|
| // Returns true if the chooser was successfully scheduled. False means we
|
| // didn't schedule anything.
|
| - bool ScheduleFileChooser(const content::FileChooserParams& params,
|
| + bool ScheduleFileChooser(const FileChooserParams& params,
|
| WebKit::WebFileChooserCompletion* completion);
|
|
|
| // Sets whether the renderer should report load progress to the browser.
|
| void SetReportLoadProgressEnabled(bool enabled);
|
|
|
| - content::old::GuestToEmbedderChannel* GetGuestToEmbedderChannel() const;
|
| - void SetGuestToEmbedderChannel(content::old::GuestToEmbedderChannel* channel);
|
| + old::GuestToEmbedderChannel* GetGuestToEmbedderChannel() const;
|
| + void SetGuestToEmbedderChannel(old::GuestToEmbedderChannel* channel);
|
| PP_Instance guest_pp_instance() const { return guest_pp_instance_; }
|
| void set_guest_pp_instance(PP_Instance instance) {
|
| guest_pp_instance_ = instance;
|
| @@ -346,7 +335,7 @@
|
| void PpapiPluginSelectionChanged();
|
|
|
| // Notification that a PPAPI plugin has been created.
|
| - void PpapiPluginCreated(content::RendererPpapiHost* host);
|
| + void PpapiPluginCreated(RendererPpapiHost* host);
|
|
|
| // Retrieves the current caret position if a PPAPI plugin has focus.
|
| bool GetPpapiPluginCaretBounds(gfx::Rect* rect);
|
| @@ -696,7 +685,7 @@
|
| const WebKit::WebCString& data,
|
| PageSerializationStatus status) OVERRIDE;
|
|
|
| - // content::RenderView implementation ----------------------------------------
|
| + // RenderView implementation -------------------------------------------------
|
|
|
| virtual bool Send(IPC::Message* message) OVERRIDE;
|
| virtual int GetRoutingID() const OVERRIDE;
|
| @@ -719,9 +708,8 @@
|
| virtual int GetEnabledBindings() const OVERRIDE;
|
| virtual bool GetContentStateImmediately() const OVERRIDE;
|
| virtual float GetFilteredTimePerFrame() const OVERRIDE;
|
| - virtual int ShowContextMenu(
|
| - content::ContextMenuClient* client,
|
| - const content::ContextMenuParams& params) OVERRIDE;
|
| + virtual int ShowContextMenu(ContextMenuClient* client,
|
| + const ContextMenuParams& params) OVERRIDE;
|
| virtual void CancelContextMenu(int request_id) OVERRIDE;
|
| virtual WebKit::WebPageVisibilityState GetVisibilityState() const OVERRIDE;
|
| virtual void RunModalAlertDialog(WebKit::WebFrame* frame,
|
| @@ -808,7 +796,7 @@
|
| friend class PepperDeviceTest;
|
| friend class RendererAccessibilityTest;
|
| friend class WebIntentsHostTest;
|
| - friend class content::RenderViewTest;
|
| + friend class RenderViewTest;
|
|
|
| FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange);
|
| FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase);
|
| @@ -851,7 +839,7 @@
|
|
|
| RenderViewImpl(gfx::NativeViewId parent_hwnd,
|
| int32 opener_id,
|
| - const content::RendererPreferences& renderer_prefs,
|
| + const RendererPreferences& renderer_prefs,
|
| const webkit_glue::WebPreferences& webkit_prefs,
|
| SharedRenderViewCounter* counter,
|
| int32 routing_id,
|
| @@ -862,8 +850,7 @@
|
| bool swapped_out,
|
| int32 next_page_id,
|
| const WebKit::WebScreenInfo& screen_info,
|
| - content::old::GuestToEmbedderChannel*
|
| - guest_to_embedder_channel,
|
| + old::GuestToEmbedderChannel* guest_to_embedder_channel,
|
| AccessibilityMode accessibility_mode);
|
|
|
| // Do not delete directly. This class is reference counted.
|
| @@ -893,10 +880,10 @@
|
|
|
| void OpenURL(WebKit::WebFrame* frame,
|
| const GURL& url,
|
| - const content::Referrer& referrer,
|
| + const Referrer& referrer,
|
| WebKit::WebNavigationPolicy policy);
|
|
|
| - bool RunJavaScriptMessage(content::JavaScriptMessageType type,
|
| + bool RunJavaScriptMessage(JavaScriptMessageType type,
|
| const string16& message,
|
| const string16& default_value,
|
| const GURL& frame_url,
|
| @@ -924,16 +911,14 @@
|
| void OnCancelDownload(int32 download_id);
|
| void OnClearFocusedNode();
|
| void OnClosePage();
|
| - void OnContextMenuClosed(
|
| - const content::CustomContextMenuContext& custom_context);
|
| + void OnContextMenuClosed(const CustomContextMenuContext& custom_context);
|
| void OnCopy();
|
| void OnCopyImageAt(int x, int y);
|
| void OnCut();
|
| void OnCSSInsertRequest(const string16& frame_xpath,
|
| const std::string& css);
|
| - void OnCustomContextMenuAction(
|
| - const content::CustomContextMenuContext& custom_context,
|
| - unsigned action);
|
| + void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context,
|
| + unsigned action);
|
| void OnDelete();
|
| void OnDeterminePageLanguage();
|
| void OnDisableScrollbarsForSmallWindows(
|
| @@ -1014,14 +999,14 @@
|
| void OnSetInitialFocus(bool reverse);
|
| void OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect);
|
| void OnSetPageEncoding(const std::string& encoding_name);
|
| - void OnSetRendererPrefs(const content::RendererPreferences& renderer_prefs);
|
| + void OnSetRendererPrefs(const RendererPreferences& renderer_prefs);
|
| void OnSetZoomLevel(double zoom_level);
|
| CONTENT_EXPORT void OnSetZoomLevelForLoadingURL(const GURL& url,
|
| double zoom_level);
|
| void OnExitFullscreen();
|
| void OnShouldClose();
|
| void OnStop();
|
| - void OnStopFinding(content::StopFindAction action);
|
| + void OnStopFinding(StopFindAction action);
|
| CONTENT_EXPORT void OnSwapOut(const ViewMsg_SwapOut_Params& params);
|
| void OnThemeChanged();
|
| void OnUndo();
|
| @@ -1031,9 +1016,8 @@
|
| const webkit_glue::WebPreferences& prefs);
|
| CONTENT_EXPORT void OnUnselect();
|
|
|
| - void OnZoom(content::PageZoom zoom);
|
| - void OnZoomFactor(content::PageZoom zoom, int zoom_center_x,
|
| - int zoom_center_y);
|
| + void OnZoom(PageZoom zoom);
|
| + void OnZoomFactor(PageZoom zoom, int zoom_center_x, int zoom_center_y);
|
|
|
| void OnEnableViewSourceMode();
|
|
|
| @@ -1068,8 +1052,8 @@
|
| // and put it in the same position in the .cc file.
|
|
|
| // Misc private functions ----------------------------------------------------
|
| - void ZoomFactorHelper(content::PageZoom zoom, int zoom_center_x,
|
| - int zoom_center_y, float scaling_increment);
|
| + void ZoomFactorHelper(PageZoom zoom, int zoom_center_x, int zoom_center_y,
|
| + float scaling_increment);
|
|
|
| void AltErrorPageFinished(WebKit::WebFrame* frame,
|
| const WebKit::WebURLError& original_error,
|
| @@ -1159,11 +1143,11 @@
|
|
|
| // If we initiated a navigation, this function will populate |document_state|
|
| // with the navigation information saved in OnNavigate().
|
| - void PopulateDocumentStateFromPending(content::DocumentState* document_state);
|
| + void PopulateDocumentStateFromPending(DocumentState* document_state);
|
|
|
| // Returns a new NavigationState populated with the navigation information
|
| // saved in OnNavigate().
|
| - content::NavigationState* CreateNavigationStateFromPending();
|
| + NavigationState* CreateNavigationStateFromPending();
|
|
|
| // Processes the command-line flags --enable-viewport and
|
| // --enable-fixed-layout[=w,h].
|
| @@ -1185,7 +1169,7 @@
|
| void StartNavStateSyncTimerIfNecessary();
|
|
|
| // Stops the current find-in-page search.
|
| - void StopFinding(content::StopFindAction action);
|
| + void StopFinding(StopFindAction action);
|
|
|
| // Dispatches the current navigation state to the browser. Called on a
|
| // periodic timer so we don't send too many messages.
|
| @@ -1215,7 +1199,7 @@
|
| // Settings ------------------------------------------------------------------
|
|
|
| webkit_glue::WebPreferences webkit_preferences_;
|
| - content::RendererPreferences renderer_preferences_;
|
| + RendererPreferences renderer_preferences_;
|
|
|
| HostZoomLevels host_zoom_levels_;
|
|
|
| @@ -1266,7 +1250,7 @@
|
| // of the page that initiated it. Specifically, when a load is committed this
|
| // is used to determine if that load originated from a client-side redirect.
|
| // It is empty if there is no top-level client-side redirect.
|
| - content::Referrer completed_client_redirect_src_;
|
| + Referrer completed_client_redirect_src_;
|
|
|
| // Holds state pertaining to a navigation that we initiated. This is held by
|
| // the WebDataSource::ExtraData attribute. We use pending_navigation_state_
|
| @@ -1278,7 +1262,7 @@
|
| base::OneShotTimer<RenderViewImpl> nav_state_sync_timer_;
|
|
|
| // Page IDs ------------------------------------------------------------------
|
| - // See documentation in content::RenderView.
|
| + // See documentation in RenderView.
|
| int32 page_id_;
|
|
|
| // Indicates the ID of the last page that we sent a FrameNavigate to the
|
| @@ -1360,8 +1344,7 @@
|
| // plugins) are normally only on "regular" pages and the regular pages will
|
| // always respond properly to the request, so we don't have to worry so
|
| // much about leaks.
|
| - IDMap<content::ContextMenuClient, IDMapExternalPointer>
|
| - pending_context_menus_;
|
| + IDMap<ContextMenuClient, IDMapExternalPointer> pending_context_menus_;
|
|
|
| // View ----------------------------------------------------------------------
|
|
|
| @@ -1429,7 +1412,7 @@
|
|
|
| // Only valid if |accessibility_mode_| is anything other than
|
| // AccessibilityModeOff.
|
| - content::RendererAccessibility* renderer_accessibility_;
|
| + RendererAccessibility* renderer_accessibility_;
|
|
|
| // Java Bridge dispatcher attached to this view; lazily initialized.
|
| JavaBridgeDispatcher* java_bridge_dispatcher_;
|
| @@ -1445,13 +1428,12 @@
|
| size_t expected_content_intent_id_;
|
|
|
| // List of click-based content detectors.
|
| - typedef std::vector< linked_ptr<content::ContentDetector> >
|
| - ContentDetectorList;
|
| + typedef std::vector< linked_ptr<ContentDetector> > ContentDetectorList;
|
| ContentDetectorList content_detectors_;
|
|
|
| // Proxy class for WebMediaPlayer to communicate with the real media player
|
| // objects in browser process.
|
| - content::WebMediaPlayerProxyImplAndroid* media_player_proxy_;
|
| + WebMediaPlayerProxyImplAndroid* media_player_proxy_;
|
|
|
| // The media player manager for managing all the media players on this view.
|
| scoped_ptr<webkit_media::WebMediaPlayerManagerAndroid> media_player_manager_;
|
| @@ -1516,7 +1498,7 @@
|
|
|
| // All the registered observers. We expect this list to be small, so vector
|
| // is fine.
|
| - ObserverList<content::RenderViewObserver> observers_;
|
| + ObserverList<RenderViewObserver> observers_;
|
|
|
| // Used to inform didChangeSelection() when it is called in the context
|
| // of handling a ViewMsg_SelectRange IPC.
|
| @@ -1542,8 +1524,7 @@
|
| scoped_ptr<DomAutomationController> dom_automation_controller_;
|
|
|
| // Channel for communication with embedding renderer, if it exists.
|
| - scoped_refptr<content::old::GuestToEmbedderChannel>
|
| - guest_to_embedder_channel_;
|
| + scoped_refptr<old::GuestToEmbedderChannel> guest_to_embedder_channel_;
|
|
|
| // The pepper instance identifer for this guest RenderView.
|
| PP_Instance guest_pp_instance_;
|
| @@ -1589,7 +1570,7 @@
|
|
|
| // NOTE: pepper_delegate_ should be last member because its constructor calls
|
| // AddObservers method of RenderViewImpl from c-tor.
|
| - content::PepperPluginDelegateImpl pepper_delegate_;
|
| + PepperPluginDelegateImpl pepper_delegate_;
|
|
|
| // ---------------------------------------------------------------------------
|
| // ADDING NEW DATA? Please see if it fits appropriately in one of the above
|
| @@ -1603,4 +1584,6 @@
|
| DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
|
| };
|
|
|
| +} // namespace content
|
| +
|
| #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
|
|
|