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

Side by Side Diff: views/window/window_gtk.cc

Issue 3060045: Making window.focus() work in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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
« no previous file with comments | « views/window/window_gtk.h ('k') | views/window/window_win.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 "views/window/window_gtk.h" 5 #include "views/window/window_gtk.h"
6 6
7 #include "gfx/rect.h" 7 #include "gfx/rect.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "gfx/path.h" 10 #include "gfx/path.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 void WindowGtk::HideWindow() { 125 void WindowGtk::HideWindow() {
126 Hide(); 126 Hide();
127 } 127 }
128 128
129 void WindowGtk::Activate() { 129 void WindowGtk::Activate() {
130 gtk_window_present(GTK_WINDOW(GetNativeView())); 130 gtk_window_present(GTK_WINDOW(GetNativeView()));
131 } 131 }
132 132
133 void WindowGtk::Deactivate() {
134 // TODO(jcivelli): http://crbug.com/51364 Implement me.
135 }
136
133 void WindowGtk::Close() { 137 void WindowGtk::Close() {
134 if (window_closed_) { 138 if (window_closed_) {
135 // Don't do anything if we've already been closed. 139 // Don't do anything if we've already been closed.
136 return; 140 return;
137 } 141 }
138 142
139 if (non_client_view_->CanClose()) { 143 if (non_client_view_->CanClose()) {
140 WidgetGtk::Close(); 144 WidgetGtk::Close();
141 window_closed_ = true; 145 window_closed_ = true;
142 } 146 }
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 size.width(), size.height()); 487 size.width(), size.height());
484 SetBounds(bounds, NULL); 488 SetBounds(bounds, NULL);
485 } 489 }
486 490
487 void WindowGtk::OnDestroy(GtkWidget* widget) { 491 void WindowGtk::OnDestroy(GtkWidget* widget) {
488 non_client_view_->WindowClosing(); 492 non_client_view_->WindowClosing();
489 WidgetGtk::OnDestroy(widget); 493 WidgetGtk::OnDestroy(widget);
490 } 494 }
491 495
492 } // namespace views 496 } // namespace views
OLDNEW
« no previous file with comments | « views/window/window_gtk.h ('k') | views/window/window_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698