OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TAB_CONTENTS_TAB_CONTENTS_OBSERVER_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_OBSERVER_H_ |
6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_OBSERVER_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_OBSERVER_H_ |
7 | 7 |
| 8 #include "base/process_util.h" |
8 #include "content/browser/tab_contents/navigation_controller.h" | 9 #include "content/browser/tab_contents/navigation_controller.h" |
9 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
10 #include "content/public/common/page_transition_types.h" | 11 #include "content/public/common/page_transition_types.h" |
11 #include "ipc/ipc_channel.h" | 12 #include "ipc/ipc_channel.h" |
12 #include "webkit/glue/window_open_disposition.h" | 13 #include "webkit/glue/window_open_disposition.h" |
13 | 14 |
14 class RenderViewHost; | 15 class RenderViewHost; |
15 struct ViewHostMsg_FrameNavigate_Params; | 16 struct ViewHostMsg_FrameNavigate_Params; |
16 | 17 |
17 // An observer API implemented by classes which are interested in various page | 18 // An observer API implemented by classes which are interested in various page |
18 // load events from TabContents. They also get a chance to filter IPC messages. | 19 // load events from TabContents. They also get a chance to filter IPC messages. |
19 class CONTENT_EXPORT TabContentsObserver : public IPC::Channel::Listener, | 20 class CONTENT_EXPORT TabContentsObserver : public IPC::Channel::Listener, |
20 public IPC::Message::Sender { | 21 public IPC::Message::Sender { |
21 public: | 22 public: |
22 virtual void RenderViewCreated(RenderViewHost* render_view_host); | 23 virtual void RenderViewCreated(RenderViewHost* render_view_host); |
23 virtual void RenderViewDeleted(RenderViewHost* render_view_host); | 24 virtual void RenderViewDeleted(RenderViewHost* render_view_host); |
24 virtual void RenderViewReady(); | 25 virtual void RenderViewReady(); |
25 virtual void RenderViewGone(); | 26 virtual void RenderViewGone(base::TerminationStatus status); |
26 virtual void NavigateToPendingEntry( | 27 virtual void NavigateToPendingEntry( |
27 const GURL& url, | 28 const GURL& url, |
28 NavigationController::ReloadType reload_type); | 29 NavigationController::ReloadType reload_type); |
29 virtual void DidNavigateMainFrame( | 30 virtual void DidNavigateMainFrame( |
30 const content::LoadCommittedDetails& details, | 31 const content::LoadCommittedDetails& details, |
31 const ViewHostMsg_FrameNavigate_Params& params); | 32 const ViewHostMsg_FrameNavigate_Params& params); |
32 virtual void DidNavigateAnyFrame( | 33 virtual void DidNavigateAnyFrame( |
33 const content::LoadCommittedDetails& details, | 34 const content::LoadCommittedDetails& details, |
34 const ViewHostMsg_FrameNavigate_Params& params); | 35 const ViewHostMsg_FrameNavigate_Params& params); |
35 // |render_view_host| is the RenderViewHost for which the provisional load is | 36 // |render_view_host| is the RenderViewHost for which the provisional load is |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // Invoked from TabContents. Invokes TabContentsDestroyed and NULL out | 127 // Invoked from TabContents. Invokes TabContentsDestroyed and NULL out |
127 // |tab_contents_|. | 128 // |tab_contents_|. |
128 void TabContentsDestroyed(); | 129 void TabContentsDestroyed(); |
129 | 130 |
130 TabContents* tab_contents_; | 131 TabContents* tab_contents_; |
131 | 132 |
132 DISALLOW_COPY_AND_ASSIGN(TabContentsObserver); | 133 DISALLOW_COPY_AND_ASSIGN(TabContentsObserver); |
133 }; | 134 }; |
134 | 135 |
135 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_OBSERVER_H_ | 136 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_OBSERVER_H_ |
OLD | NEW |