1c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Copyright (c) 2010 The Chromium Authors. All rights reserved.
2c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Use of this source code is governed by a BSD-style license that can be
3c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// found in the LICENSE file.
4c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
5c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch#ifndef CHROME_BROWSER_CHROMEOS_NATIVE_DIALOG_WINDOW_H_
6c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch#define CHROME_BROWSER_CHROMEOS_NATIVE_DIALOG_WINDOW_H_
73345a6884c488ff3a535c2c9acdd33d74b37e311Iain Merrick#pragma once
8c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
972a454cd3513ac24fbdd0e0cb9ad70b86a99b801Kristian Monsen#include "ui/gfx/native_widget_types.h"
10c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
11c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdochnamespace gfx {
12c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdochclass Rect;
13c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdochclass Size;
14c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch}  // namespace gfx
15c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
16c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdochnamespace chromeos {
17c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
18c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Flags for ShowNativeDialog.
19c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdochenum NativeDialogFlags {
20c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch  DIALOG_FLAG_DEFAULT    = 0x00,  // Default non-resizeable, non-modal dialog.
21c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch  DIALOG_FLAG_RESIZEABLE = 0x01,  // For resizeable dialog.
22c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch  DIALOG_FLAG_MODAL      = 0x02,  // For modal dialog.
23c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch};
24c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
25c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Shows a |native_dialog| hosted in a views::Window. |flags| are combinations
26c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// of the NativeDialogFlags. |size| is a default size. Zero width/height of
27c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// |size| means let gtk choose a proper size for that dimension. |min_size| is
28c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// the minimum size of the final host Window.
29c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdochvoid ShowNativeDialog(gfx::NativeWindow parent,
30c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch                      gfx::NativeView native_dialog,
31c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch                      int flags,
32c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch                      const gfx::Size& size,
33c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch                      const gfx::Size& min_size);
34c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
35c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Gets the container window of the given |native_dialog|.
36c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdochgfx::NativeWindow GetNativeDialogWindow(gfx::NativeView native_dialog);
37c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
38c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Gets the bounds of the contained dialog content.
39c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdochgfx::Rect GetNativeDialogContentsBounds(gfx::NativeView native_dialog);
40c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
41c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch}  // namespace chromeos
42c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
43c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch#endif  // CHROME_BROWSER_CHROMEOS_NATIVE_DIALOG_WINDOW_H_
44