OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/string16.h" | 12 #include "base/string16.h" |
| 13 #include "chrome/common/view_types.h" |
13 #include "net/base/load_states.h" | 14 #include "net/base/load_states.h" |
14 #include "webkit/glue/window_open_disposition.h" | 15 #include "webkit/glue/window_open_disposition.h" |
15 | 16 |
16 class AutofillForm; | 17 class AutofillForm; |
17 struct ContextMenuParams; | 18 struct ContextMenuParams; |
18 class FilePath; | 19 class FilePath; |
19 class GURL; | 20 class GURL; |
20 struct NativeWebKeyboardEvent; | 21 struct NativeWebKeyboardEvent; |
21 class NavigationEntry; | 22 class NavigationEntry; |
22 class Profile; | 23 class Profile; |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 virtual FavIcon* GetFavIconDelegate(); | 367 virtual FavIcon* GetFavIconDelegate(); |
367 virtual Autofill* GetAutofillDelegate(); | 368 virtual Autofill* GetAutofillDelegate(); |
368 | 369 |
369 // Gets the URL that is currently being displayed, if there is one. | 370 // Gets the URL that is currently being displayed, if there is one. |
370 virtual const GURL& GetURL() const; | 371 virtual const GURL& GetURL() const; |
371 | 372 |
372 // Return this object cast to a TabContents, if it is one. If the object is | 373 // Return this object cast to a TabContents, if it is one. If the object is |
373 // not a TabContents, returns NULL. | 374 // not a TabContents, returns NULL. |
374 virtual TabContents* GetAsTabContents(); | 375 virtual TabContents* GetAsTabContents(); |
375 | 376 |
| 377 // Return id number of browser window which this object is attached to. If no |
| 378 // browser window is attached to, just return -1. |
| 379 virtual int GetBrowserWindowID() const = 0; |
| 380 |
| 381 // Return type of RenderView which is attached with this object. |
| 382 virtual ViewType::Type GetRenderViewType() const = 0; |
| 383 |
376 // The RenderView is being constructed (message sent to the renderer process | 384 // The RenderView is being constructed (message sent to the renderer process |
377 // to construct a RenderView). Now is a good time to send other setup events | 385 // to construct a RenderView). Now is a good time to send other setup events |
378 // to the RenderView. This precedes any other commands to the RenderView. | 386 // to the RenderView. This precedes any other commands to the RenderView. |
379 virtual void RenderViewCreated(RenderViewHost* render_view_host) {} | 387 virtual void RenderViewCreated(RenderViewHost* render_view_host) {} |
380 | 388 |
381 // The RenderView has been constructed. | 389 // The RenderView has been constructed. |
382 virtual void RenderViewReady(RenderViewHost* render_view_host) {} | 390 virtual void RenderViewReady(RenderViewHost* render_view_host) {} |
383 | 391 |
384 // The RenderView died somehow (crashed or was killed by the user). | 392 // The RenderView died somehow (crashed or was killed by the user). |
385 virtual void RenderViewGone(RenderViewHost* render_view_host) {} | 393 virtual void RenderViewGone(RenderViewHost* render_view_host) {} |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 virtual void LoadStateChanged(const GURL& url, net::LoadState load_state) {} | 535 virtual void LoadStateChanged(const GURL& url, net::LoadState load_state) {} |
528 | 536 |
529 // Returns true if this view is used to host an external tab container. | 537 // Returns true if this view is used to host an external tab container. |
530 virtual bool IsExternalTabContainer() const; | 538 virtual bool IsExternalTabContainer() const; |
531 | 539 |
532 // The RenderView has inserted one css file into page. | 540 // The RenderView has inserted one css file into page. |
533 virtual void DidInsertCSS() {} | 541 virtual void DidInsertCSS() {} |
534 }; | 542 }; |
535 | 543 |
536 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 544 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
OLD | NEW |