OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // Gets the current fullscreen render widget's routing ID. Returns | 147 // Gets the current fullscreen render widget's routing ID. Returns |
148 // MSG_ROUTING_NONE when there is no fullscreen render widget. | 148 // MSG_ROUTING_NONE when there is no fullscreen render widget. |
149 int GetFullscreenWidgetRoutingID() const; | 149 int GetFullscreenWidgetRoutingID() const; |
150 | 150 |
151 // Invoked when visible SSL state (as defined by SSLStatus) changes. | 151 // Invoked when visible SSL state (as defined by SSLStatus) changes. |
152 void DidChangeVisibleSSLState(); | 152 void DidChangeVisibleSSLState(); |
153 | 153 |
154 // Informs the render view host and the BrowserPluginEmbedder, if present, of | 154 // Informs the render view host and the BrowserPluginEmbedder, if present, of |
155 // a Drag Source End. | 155 // a Drag Source End. |
156 void DragSourceEndedAt(int client_x, int client_y, int screen_x, | 156 void DragSourceEndedAt(int client_x, int client_y, int screen_x, |
157 int screen_y, WebKit::WebDragOperation operation); | 157 int screen_y, blink::WebDragOperation operation); |
158 | 158 |
159 // Informs the render view host and the BrowserPluginEmbedder, if present, of | 159 // Informs the render view host and the BrowserPluginEmbedder, if present, of |
160 // a Drag Source Move. | 160 // a Drag Source Move. |
161 void DragSourceMovedTo(int client_x, int client_y, | 161 void DragSourceMovedTo(int client_x, int client_y, |
162 int screen_x, int screen_y); | 162 int screen_x, int screen_y); |
163 | 163 |
164 // WebContents ------------------------------------------------------ | 164 // WebContents ------------------------------------------------------ |
165 virtual WebContentsDelegate* GetDelegate() OVERRIDE; | 165 virtual WebContentsDelegate* GetDelegate() OVERRIDE; |
166 virtual void SetDelegate(WebContentsDelegate* delegate) OVERRIDE; | 166 virtual void SetDelegate(WebContentsDelegate* delegate) OVERRIDE; |
167 virtual NavigationControllerImpl& GetController() OVERRIDE; | 167 virtual NavigationControllerImpl& GetController() OVERRIDE; |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 virtual void ResizeDueToAutoResize(const gfx::Size& new_size) OVERRIDE; | 400 virtual void ResizeDueToAutoResize(const gfx::Size& new_size) OVERRIDE; |
401 virtual void RequestToLockMouse(bool user_gesture, | 401 virtual void RequestToLockMouse(bool user_gesture, |
402 bool last_unlocked_by_target) OVERRIDE; | 402 bool last_unlocked_by_target) OVERRIDE; |
403 virtual void LostMouseLock() OVERRIDE; | 403 virtual void LostMouseLock() OVERRIDE; |
404 virtual void CreateNewWindow( | 404 virtual void CreateNewWindow( |
405 int route_id, | 405 int route_id, |
406 int main_frame_route_id, | 406 int main_frame_route_id, |
407 const ViewHostMsg_CreateWindow_Params& params, | 407 const ViewHostMsg_CreateWindow_Params& params, |
408 SessionStorageNamespace* session_storage_namespace) OVERRIDE; | 408 SessionStorageNamespace* session_storage_namespace) OVERRIDE; |
409 virtual void CreateNewWidget(int route_id, | 409 virtual void CreateNewWidget(int route_id, |
410 WebKit::WebPopupType popup_type) OVERRIDE; | 410 blink::WebPopupType popup_type) OVERRIDE; |
411 virtual void CreateNewFullscreenWidget(int route_id) OVERRIDE; | 411 virtual void CreateNewFullscreenWidget(int route_id) OVERRIDE; |
412 virtual void ShowCreatedWindow(int route_id, | 412 virtual void ShowCreatedWindow(int route_id, |
413 WindowOpenDisposition disposition, | 413 WindowOpenDisposition disposition, |
414 const gfx::Rect& initial_pos, | 414 const gfx::Rect& initial_pos, |
415 bool user_gesture) OVERRIDE; | 415 bool user_gesture) OVERRIDE; |
416 virtual void ShowCreatedWidget(int route_id, | 416 virtual void ShowCreatedWidget(int route_id, |
417 const gfx::Rect& initial_pos) OVERRIDE; | 417 const gfx::Rect& initial_pos) OVERRIDE; |
418 virtual void ShowCreatedFullscreenWidget(int route_id) OVERRIDE; | 418 virtual void ShowCreatedFullscreenWidget(int route_id) OVERRIDE; |
419 virtual void ShowContextMenu(const ContextMenuParams& params) OVERRIDE; | 419 virtual void ShowContextMenu(const ContextMenuParams& params) OVERRIDE; |
420 virtual void RequestMediaAccessPermission( | 420 virtual void RequestMediaAccessPermission( |
421 const MediaStreamRequest& request, | 421 const MediaStreamRequest& request, |
422 const MediaResponseCallback& callback) OVERRIDE; | 422 const MediaResponseCallback& callback) OVERRIDE; |
423 virtual SessionStorageNamespace* GetSessionStorageNamespace( | 423 virtual SessionStorageNamespace* GetSessionStorageNamespace( |
424 SiteInstance* instance) OVERRIDE; | 424 SiteInstance* instance) OVERRIDE; |
425 virtual FrameTree* GetFrameTree() OVERRIDE; | 425 virtual FrameTree* GetFrameTree() OVERRIDE; |
426 | 426 |
427 // RenderWidgetHostDelegate -------------------------------------------------- | 427 // RenderWidgetHostDelegate -------------------------------------------------- |
428 | 428 |
429 virtual void RenderWidgetDeleted( | 429 virtual void RenderWidgetDeleted( |
430 RenderWidgetHostImpl* render_widget_host) OVERRIDE; | 430 RenderWidgetHostImpl* render_widget_host) OVERRIDE; |
431 virtual bool PreHandleKeyboardEvent( | 431 virtual bool PreHandleKeyboardEvent( |
432 const NativeWebKeyboardEvent& event, | 432 const NativeWebKeyboardEvent& event, |
433 bool* is_keyboard_shortcut) OVERRIDE; | 433 bool* is_keyboard_shortcut) OVERRIDE; |
434 virtual void HandleKeyboardEvent( | 434 virtual void HandleKeyboardEvent( |
435 const NativeWebKeyboardEvent& event) OVERRIDE; | 435 const NativeWebKeyboardEvent& event) OVERRIDE; |
436 virtual bool PreHandleWheelEvent( | 436 virtual bool PreHandleWheelEvent( |
437 const WebKit::WebMouseWheelEvent& event) OVERRIDE; | 437 const blink::WebMouseWheelEvent& event) OVERRIDE; |
438 virtual void DidSendScreenRects(RenderWidgetHostImpl* rwh) OVERRIDE; | 438 virtual void DidSendScreenRects(RenderWidgetHostImpl* rwh) OVERRIDE; |
439 #if defined(OS_WIN) && defined(USE_AURA) | 439 #if defined(OS_WIN) && defined(USE_AURA) |
440 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible() OVERRIDE; | 440 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible() OVERRIDE; |
441 #endif | 441 #endif |
442 | 442 |
443 // RenderViewHostManager::Delegate ------------------------------------------- | 443 // RenderViewHostManager::Delegate ------------------------------------------- |
444 | 444 |
445 virtual bool CreateRenderViewForRenderManager( | 445 virtual bool CreateRenderViewForRenderManager( |
446 RenderViewHost* render_view_host, int opener_route_id) OVERRIDE; | 446 RenderViewHost* render_view_host, int opener_route_id) OVERRIDE; |
447 virtual void BeforeUnloadFiredFromRenderManager( | 447 virtual void BeforeUnloadFiredFromRenderManager( |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 | 717 |
718 // Recursively creates swapped out RenderViews for this tab's opener chain | 718 // Recursively creates swapped out RenderViews for this tab's opener chain |
719 // (including this tab) in the given SiteInstance, allowing other tabs to send | 719 // (including this tab) in the given SiteInstance, allowing other tabs to send |
720 // cross-process JavaScript calls to their opener(s). Returns the route ID of | 720 // cross-process JavaScript calls to their opener(s). Returns the route ID of |
721 // this tab's RenderView for |instance|. | 721 // this tab's RenderView for |instance|. |
722 int CreateOpenerRenderViews(SiteInstance* instance); | 722 int CreateOpenerRenderViews(SiteInstance* instance); |
723 | 723 |
724 // Helper for CreateNewWidget/CreateNewFullscreenWidget. | 724 // Helper for CreateNewWidget/CreateNewFullscreenWidget. |
725 void CreateNewWidget(int route_id, | 725 void CreateNewWidget(int route_id, |
726 bool is_fullscreen, | 726 bool is_fullscreen, |
727 WebKit::WebPopupType popup_type); | 727 blink::WebPopupType popup_type); |
728 | 728 |
729 // Helper for ShowCreatedWidget/ShowCreatedFullscreenWidget. | 729 // Helper for ShowCreatedWidget/ShowCreatedFullscreenWidget. |
730 void ShowCreatedWidget(int route_id, | 730 void ShowCreatedWidget(int route_id, |
731 bool is_fullscreen, | 731 bool is_fullscreen, |
732 const gfx::Rect& initial_pos); | 732 const gfx::Rect& initial_pos); |
733 | 733 |
734 // Finds the new RenderWidgetHost and returns it. Note that this can only be | 734 // Finds the new RenderWidgetHost and returns it. Note that this can only be |
735 // called once as this call also removes it from the internal map. | 735 // called once as this call also removes it from the internal map. |
736 RenderWidgetHostView* GetCreatedWidget(int route_id); | 736 RenderWidgetHostView* GetCreatedWidget(int route_id); |
737 | 737 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 // Maps the ids of pending image downloads to their callbacks | 975 // Maps the ids of pending image downloads to their callbacks |
976 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap; | 976 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap; |
977 ImageDownloadMap image_download_map_; | 977 ImageDownloadMap image_download_map_; |
978 | 978 |
979 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 979 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
980 }; | 980 }; |
981 | 981 |
982 } // namespace content | 982 } // namespace content |
983 | 983 |
984 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 984 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |