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

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

Issue 2620003: Cleanup of about box (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Split conditional Created 10 years, 6 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
« no previous file with comments | « views/window/window_gtk.h ('k') | no next file » | 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 "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "gfx/rect.h" 8 #include "gfx/rect.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 } 359 }
360 360
361 gboolean WindowGtk::OnLeaveNotify(GtkWidget* widget, GdkEventCrossing* event) { 361 gboolean WindowGtk::OnLeaveNotify(GtkWidget* widget, GdkEventCrossing* event) {
362 GdkCursor* cursor = gdk_cursor_new(GDK_LEFT_PTR); 362 GdkCursor* cursor = gdk_cursor_new(GDK_LEFT_PTR);
363 gdk_window_set_cursor(widget->window, cursor); 363 gdk_window_set_cursor(widget->window, cursor);
364 gdk_cursor_destroy(cursor); 364 gdk_cursor_destroy(cursor);
365 365
366 return WidgetGtk::OnLeaveNotify(widget, event); 366 return WidgetGtk::OnLeaveNotify(widget, event);
367 } 367 }
368 368
369 void WindowGtk::SetInitialFocus() {
370 View* v = window_delegate_->GetInitiallyFocusedView();
371 if (v) {
372 v->RequestFocus();
373 }
374 }
375
369 // static 376 // static
370 WindowGtk* WindowGtk::GetWindowForNative(GtkWidget* widget) { 377 WindowGtk* WindowGtk::GetWindowForNative(GtkWidget* widget) {
371 gpointer user_data = g_object_get_data(G_OBJECT(widget), "chrome-window"); 378 gpointer user_data = g_object_get_data(G_OBJECT(widget), "chrome-window");
372 return static_cast<WindowGtk*>(user_data); 379 return static_cast<WindowGtk*>(user_data);
373 } 380 }
374 381
375 // static 382 // static
376 void WindowGtk::SetWindowForNative(GtkWidget* widget, WindowGtk* window) { 383 void WindowGtk::SetWindowForNative(GtkWidget* widget, WindowGtk* window) {
377 g_object_set_data(G_OBJECT(widget), "chrome-window", window); 384 g_object_set_data(G_OBJECT(widget), "chrome-window", window);
378 } 385 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 size.width(), size.height()); 497 size.width(), size.height());
491 SetBounds(bounds, NULL); 498 SetBounds(bounds, NULL);
492 } 499 }
493 500
494 void WindowGtk::OnDestroy(GtkWidget* widget) { 501 void WindowGtk::OnDestroy(GtkWidget* widget) {
495 non_client_view_->WindowClosing(); 502 non_client_view_->WindowClosing();
496 WidgetGtk::OnDestroy(widget); 503 WidgetGtk::OnDestroy(widget);
497 } 504 }
498 505
499 } // namespace views 506 } // namespace views
OLDNEW
« no previous file with comments | « views/window/window_gtk.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698