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 "chrome/browser/ui/views/constrained_window_views.h" | 5 #include "chrome/browser/ui/views/constrained_window_views.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 WebContentsModalDialogHost* dialog_host) { | 630 WebContentsModalDialogHost* dialog_host) { |
631 views::Widget* dialog = new views::Widget; | 631 views::Widget* dialog = new views::Widget; |
632 | 632 |
633 views::Widget::InitParams params; | 633 views::Widget::InitParams params; |
634 params.delegate = widget_delegate; | 634 params.delegate = widget_delegate; |
635 params.child = true; | 635 params.child = true; |
636 WebContentsModalDialogHostObserver* dialog_host_observer = NULL; | 636 WebContentsModalDialogHostObserver* dialog_host_observer = NULL; |
637 if (views::DialogDelegate::UseNewStyle()) { | 637 if (views::DialogDelegate::UseNewStyle()) { |
638 params.parent = | 638 params.parent = |
639 views::Widget::GetTopLevelWidgetForNativeView(parent)->GetNativeView(); | 639 views::Widget::GetTopLevelWidgetForNativeView(parent)->GetNativeView(); |
| 640 params.remove_standard_frame = true; |
640 dialog_host_observer = | 641 dialog_host_observer = |
641 new WebContentsModalDialogHostObserverViews( | 642 new WebContentsModalDialogHostObserverViews( |
642 dialog_host, | 643 dialog_host, |
643 dialog, | 644 dialog, |
644 kWebContentsModalDialogHostObserverViewsKey); | 645 kWebContentsModalDialogHostObserverViewsKey); |
645 } else { | 646 } else { |
646 params.parent = parent; | 647 params.parent = parent; |
647 } | 648 } |
648 | 649 |
649 dialog->Init(params); | 650 dialog->Init(params); |
(...skipping 13 matching lines...) Expand all Loading... |
663 if (views::DialogDelegate::UseNewStyle()) | 664 if (views::DialogDelegate::UseNewStyle()) |
664 return views::DialogDelegate::CreateNewStyleFrameView(widget); | 665 return views::DialogDelegate::CreateNewStyleFrameView(widget); |
665 #if defined(USE_ASH) | 666 #if defined(USE_ASH) |
666 ConstrainedWindowFrameViewAsh* frame = new ConstrainedWindowFrameViewAsh; | 667 ConstrainedWindowFrameViewAsh* frame = new ConstrainedWindowFrameViewAsh; |
667 frame->Init(widget); | 668 frame->Init(widget); |
668 return frame; | 669 return frame; |
669 #endif | 670 #endif |
670 return new ConstrainedWindowFrameView(widget, | 671 return new ConstrainedWindowFrameView(widget, |
671 browser_context->IsOffTheRecord()); | 672 browser_context->IsOffTheRecord()); |
672 } | 673 } |
OLD | NEW |