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

Side by Side Diff: chrome/browser/gtk/browser_window_gtk.cc

Issue 5790002: [gtk] tabcontents fade-out for instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/gtk/browser_window_gtk.h" 5 #include "chrome/browser/gtk/browser_window_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 1102
1103 void BrowserWindowGtk::Copy() { 1103 void BrowserWindowGtk::Copy() {
1104 gtk_util::DoCopy(this); 1104 gtk_util::DoCopy(this);
1105 } 1105 }
1106 1106
1107 void BrowserWindowGtk::Paste() { 1107 void BrowserWindowGtk::Paste() {
1108 gtk_util::DoPaste(this); 1108 gtk_util::DoPaste(this);
1109 } 1109 }
1110 1110
1111 void BrowserWindowGtk::PrepareForInstant() { 1111 void BrowserWindowGtk::PrepareForInstant() {
1112 // TODO: implement fade as done on windows. 1112 TabContents* contents = contents_container_->GetTabContents();
1113 if (contents)
1114 contents->FadeForInstant();
1113 } 1115 }
1114 1116
1115 void BrowserWindowGtk::ShowInstant(TabContents* preview_contents) { 1117 void BrowserWindowGtk::ShowInstant(TabContents* preview_contents) {
1116 contents_container_->SetPreviewContents(preview_contents); 1118 contents_container_->SetPreviewContents(preview_contents);
1117 MaybeShowBookmarkBar(false); 1119 MaybeShowBookmarkBar(false);
1120
1121 TabContents* contents = contents_container_->GetTabContents();
1122 if (contents)
1123 contents->CancelInstantFade();
1118 } 1124 }
1119 1125
1120 void BrowserWindowGtk::HideInstant() { 1126 void BrowserWindowGtk::HideInstant() {
1127 #if 0
sky 2010/12/11 00:16:26 Did you intend to leave this in?
Evan Stade 2010/12/11 00:22:20 no
1128 TabContents* contents = contents_container_->GetTabContents();
1129 if (contents)
1130 contents->RemoveFade();
1131 #endif
1132
1121 contents_container_->PopPreviewContents(); 1133 contents_container_->PopPreviewContents();
1122 MaybeShowBookmarkBar(false); 1134 MaybeShowBookmarkBar(false);
1123 } 1135 }
1124 1136
1125 gfx::Rect BrowserWindowGtk::GetInstantBounds() { 1137 gfx::Rect BrowserWindowGtk::GetInstantBounds() {
1126 return gtk_util::GetWidgetScreenBounds(contents_container_->widget()); 1138 return gtk_util::GetWidgetScreenBounds(contents_container_->widget());
1127 } 1139 }
1128 1140
1129 void BrowserWindowGtk::ConfirmBrowserCloseWithPendingDownloads() { 1141 void BrowserWindowGtk::ConfirmBrowserCloseWithPendingDownloads() {
1130 new DownloadInProgressDialogGtk(browser()); 1142 new DownloadInProgressDialogGtk(browser());
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
2234 // special-case the ones where the custom frame should be used. These names 2246 // special-case the ones where the custom frame should be used. These names
2235 // are taken from the WMs' source code. 2247 // are taken from the WMs' source code.
2236 return (wm_name == "Blackbox" || 2248 return (wm_name == "Blackbox" ||
2237 wm_name == "compiz" || 2249 wm_name == "compiz" ||
2238 wm_name == "e16" || // Enlightenment DR16 2250 wm_name == "e16" || // Enlightenment DR16
2239 wm_name == "Metacity" || 2251 wm_name == "Metacity" ||
2240 wm_name == "Mutter" || 2252 wm_name == "Mutter" ||
2241 wm_name == "Openbox" || 2253 wm_name == "Openbox" ||
2242 wm_name == "Xfwm4"); 2254 wm_name == "Xfwm4");
2243 } 2255 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698