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_TAB_FIRST_RENDER_WATCHER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_TAB_FIRST_RENDER_WATCHER_H_ | 6 #define CHROME_BROWSER_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/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
11 #include "content/public/browser/notification_registrar.h" | 11 #include "content/public/browser/notification_registrar.h" |
12 | 12 |
13 class RenderViewHost; | 13 class RenderViewHost; |
14 class TabContents; | 14 class TabContents; |
15 | 15 |
16 namespace chromeos { | |
17 | |
18 // This class watches given TabContent's loading and rendering state change. | 16 // This class watches given TabContent's loading and rendering state change. |
19 // TODO(xiyuan): Move this to a proper place and share with HTMLDialogView. | |
20 class TabFirstRenderWatcher : public content::NotificationObserver { | 17 class TabFirstRenderWatcher : public content::NotificationObserver { |
21 public: | 18 public: |
22 class Delegate { | 19 class Delegate { |
23 public: | 20 public: |
24 virtual void OnRenderHostCreated(RenderViewHost* host) = 0; | 21 virtual void OnRenderHostCreated(RenderViewHost* host) = 0; |
25 virtual void OnTabMainFrameLoaded() = 0; | 22 virtual void OnTabMainFrameLoaded() = 0; |
26 virtual void OnTabMainFrameFirstRender() = 0; | 23 virtual void OnTabMainFrameFirstRender() = 0; |
27 }; | 24 }; |
28 | 25 |
29 TabFirstRenderWatcher(TabContents* tab, Delegate* delegate); | 26 TabFirstRenderWatcher(TabContents* tab, Delegate* delegate); |
(...skipping 15 matching lines...) Expand all Loading... |
45 TabContents* tab_contents_; | 42 TabContents* tab_contents_; |
46 | 43 |
47 // Delegate to notify. | 44 // Delegate to notify. |
48 Delegate* delegate_; | 45 Delegate* delegate_; |
49 | 46 |
50 content::NotificationRegistrar registrar_; | 47 content::NotificationRegistrar registrar_; |
51 | 48 |
52 DISALLOW_COPY_AND_ASSIGN(TabFirstRenderWatcher); | 49 DISALLOW_COPY_AND_ASSIGN(TabFirstRenderWatcher); |
53 }; | 50 }; |
54 | 51 |
55 } // namespace chromeos | 52 #endif // CHROME_BROWSER_TAB_FIRST_RENDER_WATCHER_H_ |
56 | |
57 #endif // CHROME_BROWSER_CHROMEOS_TAB_FIRST_RENDER_WATCHER_H_ | |
OLD | NEW |