| 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_TAB_CONTENTS_THUMBNAIL_GENERATOR_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_THUMBNAIL_GENERATOR_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_THUMBNAIL_GENERATOR_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_THUMBNAIL_GENERATOR_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 virtual void DidStartLoading(); | 127 virtual void DidStartLoading(); |
| 128 virtual void StopNavigation(); | 128 virtual void StopNavigation(); |
| 129 | 129 |
| 130 private: | 130 private: |
| 131 virtual void WidgetDidReceivePaintAtSizeAck( | 131 virtual void WidgetDidReceivePaintAtSizeAck( |
| 132 RenderWidgetHost* widget, | 132 RenderWidgetHost* widget, |
| 133 int tag, | 133 int tag, |
| 134 const gfx::Size& size); | 134 const gfx::Size& size); |
| 135 | 135 |
| 136 // NotificationObserver interface. | 136 // NotificationObserver interface. |
| 137 virtual void Observe(NotificationType type, | 137 virtual void Observe(int type, |
| 138 const NotificationSource& source, | 138 const NotificationSource& source, |
| 139 const NotificationDetails& details); | 139 const NotificationDetails& details); |
| 140 | 140 |
| 141 // Indicates that the given widget has changed is visibility. | 141 // Indicates that the given widget has changed is visibility. |
| 142 void WidgetHidden(RenderWidgetHost* widget); | 142 void WidgetHidden(RenderWidgetHost* widget); |
| 143 | 143 |
| 144 // Called when the given tab contents are disconnected (either | 144 // Called when the given tab contents are disconnected (either |
| 145 // through being closed, or because the renderer is no longer there). | 145 // through being closed, or because the renderer is no longer there). |
| 146 void TabContentsDisconnected(TabContents* contents); | 146 void TabContentsDisconnected(TabContents* contents); |
| 147 | 147 |
| 148 NotificationRegistrar registrar_; | 148 NotificationRegistrar registrar_; |
| 149 | 149 |
| 150 // Map of callback objects by sequence number. | 150 // Map of callback objects by sequence number. |
| 151 struct AsyncRequestInfo; | 151 struct AsyncRequestInfo; |
| 152 typedef std::map<int, | 152 typedef std::map<int, |
| 153 linked_ptr<AsyncRequestInfo> > ThumbnailCallbackMap; | 153 linked_ptr<AsyncRequestInfo> > ThumbnailCallbackMap; |
| 154 ThumbnailCallbackMap callback_map_; | 154 ThumbnailCallbackMap callback_map_; |
| 155 | 155 |
| 156 bool load_interrupted_; | 156 bool load_interrupted_; |
| 157 | 157 |
| 158 DISALLOW_COPY_AND_ASSIGN(ThumbnailGenerator); | 158 DISALLOW_COPY_AND_ASSIGN(ThumbnailGenerator); |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 #endif // CHROME_BROWSER_TAB_CONTENTS_THUMBNAIL_GENERATOR_H_ | 161 #endif // CHROME_BROWSER_TAB_CONTENTS_THUMBNAIL_GENERATOR_H_ |
| OLD | NEW |