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 CHROME_BROWSER_CHROMEOS_TAB_FIRST_RENDER_WATCHER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_TAB_FIRST_RENDER_WATCHER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_TAB_FIRST_RENDER_WATCHER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_TAB_FIRST_RENDER_WATCHER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "content/common/notification_observer.h" | 10 #include "content/common/notification_observer.h" |
11 #include "content/common/notification_registrar.h" | 11 #include "content/common/notification_registrar.h" |
12 | 12 |
| 13 class RenderViewHost; |
13 class TabContents; | 14 class TabContents; |
14 | 15 |
15 namespace chromeos { | 16 namespace chromeos { |
16 | 17 |
17 // This class watches given TabContent's loading and rendering state change. | 18 // This class watches given TabContent's loading and rendering state change. |
18 // TODO(xiyuan): Move this to a proper place and share with HTMLDialogView. | 19 // TODO(xiyuan): Move this to a proper place and share with HTMLDialogView. |
19 class TabFirstRenderWatcher : public NotificationObserver { | 20 class TabFirstRenderWatcher : public NotificationObserver { |
20 public: | 21 public: |
21 class Delegate { | 22 class Delegate { |
22 public: | 23 public: |
| 24 virtual void OnRenderHostCreated(RenderViewHost* host) = 0; |
23 virtual void OnTabMainFrameLoaded() = 0; | 25 virtual void OnTabMainFrameLoaded() = 0; |
24 virtual void OnTabMainFrameFirstRender() = 0; | 26 virtual void OnTabMainFrameFirstRender() = 0; |
25 }; | 27 }; |
26 | 28 |
27 TabFirstRenderWatcher(TabContents* tab, Delegate* delegate); | 29 TabFirstRenderWatcher(TabContents* tab, Delegate* delegate); |
28 | 30 |
29 private: | 31 private: |
30 // Overridden from NotificationObserver | 32 // Overridden from NotificationObserver |
31 virtual void Observe(int type, | 33 virtual void Observe(int type, |
32 const NotificationSource& source, | 34 const NotificationSource& source, |
(...skipping 13 matching lines...) Expand all Loading... |
46 Delegate* delegate_; | 48 Delegate* delegate_; |
47 | 49 |
48 NotificationRegistrar registrar_; | 50 NotificationRegistrar registrar_; |
49 | 51 |
50 DISALLOW_COPY_AND_ASSIGN(TabFirstRenderWatcher); | 52 DISALLOW_COPY_AND_ASSIGN(TabFirstRenderWatcher); |
51 }; | 53 }; |
52 | 54 |
53 } // namespace chromeos | 55 } // namespace chromeos |
54 | 56 |
55 #endif // CHROME_BROWSER_CHROMEOS_TAB_FIRST_RENDER_WATCHER_H_ | 57 #endif // CHROME_BROWSER_CHROMEOS_TAB_FIRST_RENDER_WATCHER_H_ |
OLD | NEW |