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

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: compile fixes 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_widget_host_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
1121 contents_container_->PopPreviewContents(); 1127 contents_container_->PopPreviewContents();
1122 MaybeShowBookmarkBar(false); 1128 MaybeShowBookmarkBar(false);
1123 } 1129 }
1124 1130
1125 gfx::Rect BrowserWindowGtk::GetInstantBounds() { 1131 gfx::Rect BrowserWindowGtk::GetInstantBounds() {
1126 return gtk_util::GetWidgetScreenBounds(contents_container_->widget()); 1132 return gtk_util::GetWidgetScreenBounds(contents_container_->widget());
1127 } 1133 }
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2234 // special-case the ones where the custom frame should be used. These names 2240 // special-case the ones where the custom frame should be used. These names
2235 // are taken from the WMs' source code. 2241 // are taken from the WMs' source code.
2236 return (wm_name == "Blackbox" || 2242 return (wm_name == "Blackbox" ||
2237 wm_name == "compiz" || 2243 wm_name == "compiz" ||
2238 wm_name == "e16" || // Enlightenment DR16 2244 wm_name == "e16" || // Enlightenment DR16
2239 wm_name == "Metacity" || 2245 wm_name == "Metacity" ||
2240 wm_name == "Mutter" || 2246 wm_name == "Mutter" ||
2241 wm_name == "Openbox" || 2247 wm_name == "Openbox" ||
2242 wm_name == "Xfwm4"); 2248 wm_name == "Xfwm4");
2243 } 2249 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_widget_host_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698