| OLD | NEW |
| 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 "remoting/host/disconnect_window.h" | 5 #include "remoting/host/disconnect_window.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 #include <math.h> | 8 #include <math.h> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 DISALLOW_COPY_AND_ASSIGN(DisconnectWindowGtk); | 49 DISALLOW_COPY_AND_ASSIGN(DisconnectWindowGtk); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 DisconnectWindowGtk::DisconnectWindowGtk() | 52 DisconnectWindowGtk::DisconnectWindowGtk() |
| 53 : disconnect_window_(NULL), | 53 : disconnect_window_(NULL), |
| 54 current_width_(0), | 54 current_width_(0), |
| 55 current_height_(0) { | 55 current_height_(0) { |
| 56 } | 56 } |
| 57 | 57 |
| 58 DisconnectWindowGtk::~DisconnectWindowGtk() { | 58 DisconnectWindowGtk::~DisconnectWindowGtk() { |
| 59 Hide(); |
| 59 } | 60 } |
| 60 | 61 |
| 61 void DisconnectWindowGtk::CreateWindow(const UiStrings& ui_strings) { | 62 void DisconnectWindowGtk::CreateWindow(const UiStrings& ui_strings) { |
| 62 if (disconnect_window_) return; | 63 if (disconnect_window_) return; |
| 63 | 64 |
| 64 disconnect_window_ = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 65 disconnect_window_ = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
| 65 GtkWindow* window = GTK_WINDOW(disconnect_window_); | 66 GtkWindow* window = GTK_WINDOW(disconnect_window_); |
| 66 | 67 |
| 67 g_signal_connect(disconnect_window_, "delete-event", | 68 g_signal_connect(disconnect_window_, "delete-event", |
| 68 G_CALLBACK(OnDeleteThunk), this); | 69 G_CALLBACK(OnDeleteThunk), this); |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 event->y_root, | 277 event->y_root, |
| 277 event->time); | 278 event->time); |
| 278 return FALSE; | 279 return FALSE; |
| 279 } | 280 } |
| 280 | 281 |
| 281 scoped_ptr<DisconnectWindow> DisconnectWindow::Create() { | 282 scoped_ptr<DisconnectWindow> DisconnectWindow::Create() { |
| 282 return scoped_ptr<DisconnectWindow>(new DisconnectWindowGtk()); | 283 return scoped_ptr<DisconnectWindow>(new DisconnectWindowGtk()); |
| 283 } | 284 } |
| 284 | 285 |
| 285 } // namespace remoting | 286 } // namespace remoting |
| OLD | NEW |