| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_THUMBNAILS_THUMBNAIL_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_THUMBNAILS_THUMBNAIL_TAB_HELPER_H_ |
| 6 #define CHROME_BROWSER_THUMBNAILS_THUMBNAIL_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_THUMBNAILS_THUMBNAIL_TAB_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "chrome/browser/thumbnails/thumbnailing_context.h" | 9 #include "chrome/browser/thumbnails/thumbnailing_context.h" |
| 10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // continues to receive the notifications from the web contents. | 29 // continues to receive the notifications from the web contents. |
| 30 void set_enabled(bool enabled) { enabled_ = enabled; } | 30 void set_enabled(bool enabled) { enabled_ = enabled; } |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 explicit ThumbnailTabHelper(content::WebContents* contents); | 33 explicit ThumbnailTabHelper(content::WebContents* contents); |
| 34 friend class content::WebContentsUserData<ThumbnailTabHelper>; | 34 friend class content::WebContentsUserData<ThumbnailTabHelper>; |
| 35 | 35 |
| 36 // content::NotificationObserver overrides. | 36 // content::NotificationObserver overrides. |
| 37 virtual void Observe(int type, | 37 virtual void Observe(int type, |
| 38 const content::NotificationSource& source, | 38 const content::NotificationSource& source, |
| 39 const content::NotificationDetails& details) OVERRIDE; | 39 const content::NotificationDetails& details) override; |
| 40 | 40 |
| 41 // content::WebContentsObserver overrides. | 41 // content::WebContentsObserver overrides. |
| 42 virtual void RenderViewDeleted( | 42 virtual void RenderViewDeleted( |
| 43 content::RenderViewHost* render_view_host) OVERRIDE; | 43 content::RenderViewHost* render_view_host) override; |
| 44 virtual void DidStartLoading( | 44 virtual void DidStartLoading( |
| 45 content::RenderViewHost* render_view_host) OVERRIDE; | 45 content::RenderViewHost* render_view_host) override; |
| 46 virtual void NavigationStopped() OVERRIDE; | 46 virtual void NavigationStopped() override; |
| 47 | 47 |
| 48 // Update the thumbnail of the given tab contents if necessary. | 48 // Update the thumbnail of the given tab contents if necessary. |
| 49 void UpdateThumbnailIfNecessary(content::WebContents* web_contents); | 49 void UpdateThumbnailIfNecessary(content::WebContents* web_contents); |
| 50 | 50 |
| 51 // Called when a render view host was created for a WebContents. | 51 // Called when a render view host was created for a WebContents. |
| 52 void RenderViewHostCreated(content::RenderViewHost* renderer); | 52 void RenderViewHostCreated(content::RenderViewHost* renderer); |
| 53 | 53 |
| 54 // Indicates that the given widget has changed is visibility. | 54 // Indicates that the given widget has changed is visibility. |
| 55 void WidgetHidden(content::RenderWidgetHost* widget); | 55 void WidgetHidden(content::RenderWidgetHost* widget); |
| 56 | 56 |
| 57 bool enabled_; | 57 bool enabled_; |
| 58 | 58 |
| 59 content::NotificationRegistrar registrar_; | 59 content::NotificationRegistrar registrar_; |
| 60 | 60 |
| 61 bool load_interrupted_; | 61 bool load_interrupted_; |
| 62 | 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(ThumbnailTabHelper); | 63 DISALLOW_COPY_AND_ASSIGN(ThumbnailTabHelper); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 #endif // CHROME_BROWSER_THUMBNAILS_THUMBNAIL_TAB_HELPER_H_ | 66 #endif // CHROME_BROWSER_THUMBNAILS_THUMBNAIL_TAB_HELPER_H_ |
| OLD | NEW |