Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Side by Side Diff: chrome/browser/aeropeek_manager.cc

Issue 7033048: Multi-tab: Adding new Notification when tab selection changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing comments Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "chrome/browser/aeropeek_manager.h" 5 #include "chrome/browser/aeropeek_manager.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shobjidl.h> 8 #include <shobjidl.h>
9 9
10 #include "app/win/shell.h" 10 #include "app/win/shell.h"
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 // Chrome will call TabInsertedAt() when this tab is inserted to another 1108 // Chrome will call TabInsertedAt() when this tab is inserted to another
1109 // TabStrip. We will re-create an AeroPeekWindow object for this tab and 1109 // TabStrip. We will re-create an AeroPeekWindow object for this tab and
1110 // re-add it to the tab list there. 1110 // re-add it to the tab list there.
1111 DeleteAeroPeekWindowForTab(contents); 1111 DeleteAeroPeekWindowForTab(contents);
1112 } 1112 }
1113 1113
1114 void AeroPeekManager::ActiveTabChanged(TabContentsWrapper* old_contents, 1114 void AeroPeekManager::ActiveTabChanged(TabContentsWrapper* old_contents,
1115 TabContentsWrapper* new_contents, 1115 TabContentsWrapper* new_contents,
1116 int index, 1116 int index,
1117 bool user_gesture) { 1117 bool user_gesture) {
1118 if (old_contents == new_contents)
1119 return;
1120
1121 // Deactivate the old window in the thumbnail list and activate the new one 1118 // Deactivate the old window in the thumbnail list and activate the new one
1122 // to synchronize the thumbnail list with TabStrip. 1119 // to synchronize the thumbnail list with TabStrip.
1123 if (old_contents) { 1120 if (old_contents) {
1124 AeroPeekWindow* old_window = 1121 AeroPeekWindow* old_window =
1125 GetAeroPeekWindow(GetTabID(old_contents->tab_contents())); 1122 GetAeroPeekWindow(GetTabID(old_contents->tab_contents()));
1126 if (old_window) 1123 if (old_window)
1127 old_window->Deactivate(); 1124 old_window->Deactivate();
1128 } 1125 }
1129 1126
1130 if (new_contents) { 1127 if (new_contents) {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 // This code is just copied from "thumbnail_generator.cc". 1238 // This code is just copied from "thumbnail_generator.cc".
1242 skia::PlatformCanvas canvas; 1239 skia::PlatformCanvas canvas;
1243 if (!backing_store->CopyFromBackingStore(gfx::Rect(backing_store->size()), 1240 if (!backing_store->CopyFromBackingStore(gfx::Rect(backing_store->size()),
1244 &canvas)) 1241 &canvas))
1245 return false; 1242 return false;
1246 1243
1247 const SkBitmap& bitmap = skia::GetTopDevice(canvas)->accessBitmap(false); 1244 const SkBitmap& bitmap = skia::GetTopDevice(canvas)->accessBitmap(false);
1248 bitmap.copyTo(preview, SkBitmap::kARGB_8888_Config); 1245 bitmap.copyTo(preview, SkBitmap::kARGB_8888_Config);
1249 return true; 1246 return true;
1250 } 1247 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_browser_event_router.cc » ('j') | chrome/browser/tabs/tab_strip_model.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698