Home | History | Annotate | Download | only in chromeos
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_CHROMEOS_NATIVE_DIALOG_WINDOW_H_
      6 #define CHROME_BROWSER_CHROMEOS_NATIVE_DIALOG_WINDOW_H_
      7 #pragma once
      8 
      9 #include "ui/gfx/native_widget_types.h"
     10 
     11 namespace gfx {
     12 class Rect;
     13 class Size;
     14 }  // namespace gfx
     15 
     16 namespace chromeos {
     17 
     18 // Flags for ShowNativeDialog.
     19 enum NativeDialogFlags {
     20   DIALOG_FLAG_DEFAULT    = 0x00,  // Default non-resizeable, non-modal dialog.
     21   DIALOG_FLAG_RESIZEABLE = 0x01,  // For resizeable dialog.
     22   DIALOG_FLAG_MODAL      = 0x02,  // For modal dialog.
     23 };
     24 
     25 // Shows a |native_dialog| hosted in a views::Window. |flags| are combinations
     26 // of the NativeDialogFlags. |size| is a default size. Zero width/height of
     27 // |size| means let gtk choose a proper size for that dimension. |min_size| is
     28 // the minimum size of the final host Window.
     29 void ShowNativeDialog(gfx::NativeWindow parent,
     30                       gfx::NativeView native_dialog,
     31                       int flags,
     32                       const gfx::Size& size,
     33                       const gfx::Size& min_size);
     34 
     35 // Gets the container window of the given |native_dialog|.
     36 gfx::NativeWindow GetNativeDialogWindow(gfx::NativeView native_dialog);
     37 
     38 // Gets the bounds of the contained dialog content.
     39 gfx::Rect GetNativeDialogContentsBounds(gfx::NativeView native_dialog);
     40 
     41 }  // namespace chromeos
     42 
     43 #endif  // CHROME_BROWSER_CHROMEOS_NATIVE_DIALOG_WINDOW_H_
     44