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

Side by Side Diff: chrome/browser/ui/gtk/extensions/shell_window_gtk.cc

Issue 11147037: Add a 'hidden' option to chrome.app.window.create() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ash tests Created 8 years, 1 month 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 | « chrome/browser/ui/gtk/extensions/shell_window_gtk.h ('k') | chrome/browser/ui/panels/panel.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) 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/ui/gtk/extensions/shell_window_gtk.h" 5 #include "chrome/browser/ui/gtk/extensions/shell_window_gtk.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.h" 9 #include "chrome/browser/ui/gtk/extensions/extension_keybinding_registry_gtk.h"
10 #include "chrome/browser/ui/gtk/gtk_util.h" 10 #include "chrome/browser/ui/gtk/gtk_util.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 void ShellWindowGtk::Show() { 162 void ShellWindowGtk::Show() {
163 gtk_window_present(window_); 163 gtk_window_present(window_);
164 } 164 }
165 165
166 void ShellWindowGtk::ShowInactive() { 166 void ShellWindowGtk::ShowInactive() {
167 gtk_window_set_focus_on_map(window_, false); 167 gtk_window_set_focus_on_map(window_, false);
168 gtk_widget_show(GTK_WIDGET(window_)); 168 gtk_widget_show(GTK_WIDGET(window_));
169 } 169 }
170 170
171 void ShellWindowGtk::Hide() {
172 gtk_widget_hide(GTK_WIDGET(window_));
173 }
174
171 void ShellWindowGtk::Close() { 175 void ShellWindowGtk::Close() {
172 shell_window_->SaveWindowPosition(); 176 shell_window_->SaveWindowPosition();
173 177
174 // Cancel any pending callback from the window configure debounce timer. 178 // Cancel any pending callback from the window configure debounce timer.
175 window_configure_debounce_timer_.Stop(); 179 window_configure_debounce_timer_.Stop();
176 180
177 GtkWidget* window = GTK_WIDGET(window_); 181 GtkWidget* window = GTK_WIDGET(window_);
178 // To help catch bugs in any event handlers that might get fired during the 182 // To help catch bugs in any event handlers that might get fired during the
179 // destruction, set window_ to NULL before any handlers will run. 183 // destruction, set window_ to NULL before any handlers will run.
180 window_ = NULL; 184 window_ = NULL;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 return; 361 return;
358 362
359 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); 363 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions));
360 } 364 }
361 365
362 // static 366 // static
363 NativeShellWindow* NativeShellWindow::Create( 367 NativeShellWindow* NativeShellWindow::Create(
364 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { 368 ShellWindow* shell_window, const ShellWindow::CreateParams& params) {
365 return new ShellWindowGtk(shell_window, params); 369 return new ShellWindowGtk(shell_window, params);
366 } 370 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/extensions/shell_window_gtk.h ('k') | chrome/browser/ui/panels/panel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698