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

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

Issue 5906001: Makes linux honor instant_is_active when instant temporarily hides. (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
« no previous file with comments | « no previous file | chrome/browser/tab_contents/tab_contents.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 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 TabContents* contents = contents_container_->GetTabContents(); 1112 TabContents* contents = contents_container_->GetTabContents();
1113 if (contents) 1113 if (contents)
1114 contents->FadeForInstant(); 1114 contents->FadeForInstant(false);
Evan Stade 2010/12/15 20:50:26 true?
sky 2010/12/15 21:07:58 Good catch. I inverted the meaning of the boolean
1115 } 1115 }
1116 1116
1117 void BrowserWindowGtk::ShowInstant(TabContents* preview_contents) { 1117 void BrowserWindowGtk::ShowInstant(TabContents* preview_contents) {
1118 contents_container_->SetPreviewContents(preview_contents); 1118 contents_container_->SetPreviewContents(preview_contents);
1119 MaybeShowBookmarkBar(false); 1119 MaybeShowBookmarkBar(false);
1120 1120
1121 TabContents* contents = contents_container_->GetTabContents(); 1121 TabContents* contents = contents_container_->GetTabContents();
1122 if (contents) 1122 if (contents)
1123 contents->CancelInstantFade(); 1123 contents->CancelInstantFade();
1124 } 1124 }
1125 1125
1126 void BrowserWindowGtk::HideInstant(bool instant_is_active) { 1126 void BrowserWindowGtk::HideInstant(bool instant_is_active) {
1127 contents_container_->PopPreviewContents(); 1127 contents_container_->PopPreviewContents();
1128 MaybeShowBookmarkBar(false); 1128 MaybeShowBookmarkBar(false);
1129 1129
1130 // TODO(sky): honor instant_is_active. 1130 TabContents* contents = contents_container_->GetTabContents();
1131 if (contents) {
1132 if (instant_is_active)
1133 contents->FadeForInstant(false);
1134 else
1135 contents->CancelInstantFade();
1136 }
1131 } 1137 }
1132 1138
1133 gfx::Rect BrowserWindowGtk::GetInstantBounds() { 1139 gfx::Rect BrowserWindowGtk::GetInstantBounds() {
1134 return gtk_util::GetWidgetScreenBounds(contents_container_->widget()); 1140 return gtk_util::GetWidgetScreenBounds(contents_container_->widget());
1135 } 1141 }
1136 1142
1137 void BrowserWindowGtk::ConfirmBrowserCloseWithPendingDownloads() { 1143 void BrowserWindowGtk::ConfirmBrowserCloseWithPendingDownloads() {
1138 new DownloadInProgressDialogGtk(browser()); 1144 new DownloadInProgressDialogGtk(browser());
1139 } 1145 }
1140 1146
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
2246 // special-case the ones where the custom frame should be used. These names 2252 // special-case the ones where the custom frame should be used. These names
2247 // are taken from the WMs' source code. 2253 // are taken from the WMs' source code.
2248 return (wm_name == "Blackbox" || 2254 return (wm_name == "Blackbox" ||
2249 wm_name == "compiz" || 2255 wm_name == "compiz" ||
2250 wm_name == "e16" || // Enlightenment DR16 2256 wm_name == "e16" || // Enlightenment DR16
2251 wm_name == "Metacity" || 2257 wm_name == "Metacity" ||
2252 wm_name == "Mutter" || 2258 wm_name == "Mutter" ||
2253 wm_name == "Openbox" || 2259 wm_name == "Openbox" ||
2254 wm_name == "Xfwm4"); 2260 wm_name == "Xfwm4");
2255 } 2261 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698