| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 | 86 |
| 87 class View { | 87 class View { |
| 88 public: | 88 public: |
| 89 // The page is trying to open a new page (e.g. a popup window). The | 89 // The page is trying to open a new page (e.g. a popup window). The |
| 90 // window should be created associated with the given route, but it should | 90 // window should be created associated with the given route, but it should |
| 91 // not be shown yet. That should happen in response to ShowCreatedWindow. | 91 // not be shown yet. That should happen in response to ShowCreatedWindow. |
| 92 // |window_container_type| describes the type of RenderViewHost container | 92 // |window_container_type| describes the type of RenderViewHost container |
| 93 // that is requested -- in particular, the window.open call may have | 93 // that is requested -- in particular, the window.open call may have |
| 94 // specified 'background' and 'persistent' in the feature string. | 94 // specified 'background' and 'persistent' in the feature string. |
| 95 // | 95 // |
| 96 // The passed frame_name parameter is the _name_ parameter that was passed | |
|
rafaelw
2010/06/10 22:48:05
nit: The passed frame_name parameter -> |frame_nam
| |
| 97 // to window.open(), and will be empty if none was passed. | |
| 98 // | |
| 96 // Note: this is not called "CreateWindow" because that will clash with | 99 // Note: this is not called "CreateWindow" because that will clash with |
| 97 // the Windows function which is actually a #define. | 100 // the Windows function which is actually a #define. |
| 98 // | 101 // |
| 99 // NOTE: this takes ownership of @modal_dialog_event | 102 // NOTE: this takes ownership of @modal_dialog_event |
| 100 virtual void CreateNewWindow( | 103 virtual void CreateNewWindow( |
| 101 int route_id, | 104 int route_id, |
| 102 WindowContainerType window_container_type) = 0; | 105 WindowContainerType window_container_type, |
| 106 const string16& frame_name) = 0; | |
| 103 | 107 |
| 104 // The page is trying to open a new widget (e.g. a select popup). The | 108 // The page is trying to open a new widget (e.g. a select popup). The |
| 105 // widget should be created associated with the given route, but it should | 109 // widget should be created associated with the given route, but it should |
| 106 // not be shown yet. That should happen in response to ShowCreatedWidget. | 110 // not be shown yet. That should happen in response to ShowCreatedWidget. |
| 107 // |popup_type| indicates if the widget is a popup and what kind of popup it | 111 // |popup_type| indicates if the widget is a popup and what kind of popup it |
| 108 // is (select, autofill...). | 112 // is (select, autofill...). |
| 109 virtual void CreateNewWidget(int route_id, | 113 virtual void CreateNewWidget(int route_id, |
| 110 WebKit::WebPopupType popup_type) = 0; | 114 WebKit::WebPopupType popup_type) = 0; |
| 111 | 115 |
| 112 // Show a previously created page with the specified disposition and bounds. | 116 // Show a previously created page with the specified disposition and bounds. |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 468 // not a TabContents, returns NULL. | 472 // not a TabContents, returns NULL. |
| 469 virtual TabContents* GetAsTabContents(); | 473 virtual TabContents* GetAsTabContents(); |
| 470 | 474 |
| 471 // Return id number of browser window which this object is attached to. If no | 475 // Return id number of browser window which this object is attached to. If no |
| 472 // browser window is attached to, just return -1. | 476 // browser window is attached to, just return -1. |
| 473 virtual int GetBrowserWindowID() const = 0; | 477 virtual int GetBrowserWindowID() const = 0; |
| 474 | 478 |
| 475 // Return type of RenderView which is attached with this object. | 479 // Return type of RenderView which is attached with this object. |
| 476 virtual ViewType::Type GetRenderViewType() const = 0; | 480 virtual ViewType::Type GetRenderViewType() const = 0; |
| 477 | 481 |
| 482 // Return the desired name of the frame that will be associated with the | |
| 483 // RenderView. | |
| 484 virtual string16 GetRenderViewFrameName() const { return string16(); } | |
|
rafaelw
2010/06/10 22:48:05
This feels kinda wrong. I think providing frame_na
Andrew T Wilson
2010/06/11 04:24:01
I don't have a strong motivation or preference eit
| |
| 485 | |
| 478 // The RenderView is being constructed (message sent to the renderer process | 486 // The RenderView is being constructed (message sent to the renderer process |
| 479 // to construct a RenderView). Now is a good time to send other setup events | 487 // to construct a RenderView). Now is a good time to send other setup events |
| 480 // to the RenderView. This precedes any other commands to the RenderView. | 488 // to the RenderView. This precedes any other commands to the RenderView. |
| 481 virtual void RenderViewCreated(RenderViewHost* render_view_host) {} | 489 virtual void RenderViewCreated(RenderViewHost* render_view_host) {} |
| 482 | 490 |
| 483 // The RenderView has been constructed. | 491 // The RenderView has been constructed. |
| 484 virtual void RenderViewReady(RenderViewHost* render_view_host) {} | 492 virtual void RenderViewReady(RenderViewHost* render_view_host) {} |
| 485 | 493 |
| 486 // The RenderView died somehow (crashed or was killed by the user). | 494 // The RenderView died somehow (crashed or was killed by the user). |
| 487 virtual void RenderViewGone(RenderViewHost* render_view_host) {} | 495 virtual void RenderViewGone(RenderViewHost* render_view_host) {} |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 650 virtual bool IsExternalTabContainer() const; | 658 virtual bool IsExternalTabContainer() const; |
| 651 | 659 |
| 652 // The RenderView has inserted one css file into page. | 660 // The RenderView has inserted one css file into page. |
| 653 virtual void DidInsertCSS() {} | 661 virtual void DidInsertCSS() {} |
| 654 | 662 |
| 655 // A different node in the page got focused. | 663 // A different node in the page got focused. |
| 656 virtual void FocusedNodeChanged() {} | 664 virtual void FocusedNodeChanged() {} |
| 657 }; | 665 }; |
| 658 | 666 |
| 659 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 667 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
| OLD | NEW |