| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromeos/native_dialog_window.h" | 5 #include "chrome/browser/chromeos/native_dialog_window.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include "app/gtk_signal.h" | 9 #include "app/gtk_signal.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/browser/chromeos/frame/bubble_window.h" | 12 #include "chrome/browser/chromeos/frame/bubble_window.h" |
| 13 #include "chrome/browser/views/window.h" | 13 #include "chrome/browser/ui/views/window.h" |
| 14 #include "views/controls/native/native_view_host.h" | 14 #include "views/controls/native/native_view_host.h" |
| 15 #include "views/window/dialog_delegate.h" | 15 #include "views/window/dialog_delegate.h" |
| 16 #include "views/window/non_client_view.h" | 16 #include "views/window/non_client_view.h" |
| 17 #include "views/window/window.h" | 17 #include "views/window/window.h" |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 const int kDialogPadding = 3; | 21 const int kDialogPadding = 3; |
| 22 | 22 |
| 23 const char kNativeDialogHost[] = "_chromeos_native_dialog_host_"; | 23 const char kNativeDialogHost[] = "_chromeos_native_dialog_host_"; |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 return host ? host->window()->GetNativeWindow() : NULL; | 277 return host ? host->window()->GetNativeWindow() : NULL; |
| 278 } | 278 } |
| 279 | 279 |
| 280 gfx::Rect GetNativeDialogContentsBounds(gfx::NativeView native_dialog) { | 280 gfx::Rect GetNativeDialogContentsBounds(gfx::NativeView native_dialog) { |
| 281 NativeDialogHost* host = reinterpret_cast<NativeDialogHost*>( | 281 NativeDialogHost* host = reinterpret_cast<NativeDialogHost*>( |
| 282 g_object_get_data(G_OBJECT(native_dialog), kNativeDialogHost)); | 282 g_object_get_data(G_OBJECT(native_dialog), kNativeDialogHost)); |
| 283 return host ? host->bounds() : gfx::Rect(); | 283 return host ? host->bounds() : gfx::Rect(); |
| 284 } | 284 } |
| 285 | 285 |
| 286 } // namespace chromeos | 286 } // namespace chromeos |
| OLD | NEW |