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 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" | 5 #include "chrome/browser/thumbnails/thumbnail_tab_helper.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/thumbnails/thumbnail_service.h" | 10 #include "chrome/browser/thumbnails/thumbnail_service.h" |
11 #include "chrome/browser/thumbnails/thumbnail_service_factory.h" | 11 #include "chrome/browser/thumbnails/thumbnail_service_factory.h" |
12 #include "chrome/browser/thumbnails/thumbnailing_algorithm.h" | 12 #include "chrome/browser/thumbnails/thumbnailing_algorithm.h" |
13 #include "chrome/browser/thumbnails/thumbnailing_context.h" | 13 #include "chrome/browser/thumbnails/thumbnailing_context.h" |
14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
15 #include "content/public/browser/notification_details.h" | 15 #include "content/public/browser/notification_details.h" |
16 #include "content/public/browser/notification_source.h" | 16 #include "content/public/browser/notification_source.h" |
17 #include "content/public/browser/notification_types.h" | 17 #include "content/public/browser/notification_types.h" |
18 #include "content/public/browser/render_view_host.h" | 18 #include "content/public/browser/render_view_host.h" |
19 #include "content/public/browser/render_widget_host.h" | 19 #include "content/public/browser/render_widget_host.h" |
20 #include "content/public/browser/render_widget_host_view.h" | 20 #include "content/public/browser/render_widget_host_view.h" |
21 #include "ui/gfx/color_utils.h" | 21 #include "ui/gfx/color_utils.h" |
22 #include "ui/gfx/geometry/size_conversions.h" | 22 #include "ui/gfx/geometry/size_conversions.h" |
23 #include "ui/gfx/screen.h" | |
24 #include "ui/gfx/scrollbar_size.h" | 23 #include "ui/gfx/scrollbar_size.h" |
25 #include "ui/gfx/skbitmap_operations.h" | 24 #include "ui/gfx/skbitmap_operations.h" |
26 | 25 |
27 #if defined(OS_WIN) | 26 #if defined(OS_WIN) |
28 #include "base/win/windows_version.h" | 27 #include "base/win/windows_version.h" |
29 #endif | 28 #endif |
30 | 29 |
31 DEFINE_WEB_CONTENTS_USER_DATA_KEY(ThumbnailTabHelper); | 30 DEFINE_WEB_CONTENTS_USER_DATA_KEY(ThumbnailTabHelper); |
32 | 31 |
33 class SkBitmap; | 32 class SkBitmap; |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 content::Source<RenderWidgetHost>(renderer->GetWidget())); | 249 content::Source<RenderWidgetHost>(renderer->GetWidget())); |
251 if (!registered) { | 250 if (!registered) { |
252 registrar_.Add(this, content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED, | 251 registrar_.Add(this, content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED, |
253 content::Source<RenderWidgetHost>(renderer->GetWidget())); | 252 content::Source<RenderWidgetHost>(renderer->GetWidget())); |
254 } | 253 } |
255 } | 254 } |
256 | 255 |
257 void ThumbnailTabHelper::WidgetHidden(RenderWidgetHost* widget) { | 256 void ThumbnailTabHelper::WidgetHidden(RenderWidgetHost* widget) { |
258 UpdateThumbnailIfNecessary(); | 257 UpdateThumbnailIfNecessary(); |
259 } | 258 } |
OLD | NEW |