Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Side by Side Diff: chrome/browser/ui/views/constrained_window_views.cc

Issue 12221055: Use a uniform opaque type to represent web contents modal dialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable unused webui certificate viewer on linux Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 #if defined(USE_ASH) 605 #if defined(USE_ASH)
606 // We don't necessarily have a RootWindow yet. 606 // We don't necessarily have a RootWindow yet.
607 if (GetNativeView()->GetRootWindow()) 607 if (GetNativeView()->GetRootWindow())
608 GetNativeView()->Focus(); 608 GetNativeView()->Focus();
609 #endif 609 #endif
610 } 610 }
611 611
612 void ConstrainedWindowViews::PulseWebContentsModalDialog() { 612 void ConstrainedWindowViews::PulseWebContentsModalDialog() {
613 } 613 }
614 614
615 gfx::NativeWindow ConstrainedWindowViews::GetNativeWindow() { 615 NativeWebContentsModalDialog ConstrainedWindowViews::GetNativeDialog() {
616 return Widget::GetNativeWindow(); 616 return GetNativeView();
617 } 617 }
618 618
619 ConstrainedWindowViews* ConstrainedWindowViews::Create( 619 ConstrainedWindowViews* ConstrainedWindowViews::Create(
620 content::WebContents* web_contents, 620 content::WebContents* web_contents,
621 views::WidgetDelegate* widget_delegate) { 621 views::WidgetDelegate* widget_delegate) {
622 WebContentsModalDialogManager* manager = 622 WebContentsModalDialogManager* manager =
623 WebContentsModalDialogManager::FromWebContents(web_contents); 623 WebContentsModalDialogManager::FromWebContents(web_contents);
624 ConstrainedWindowViews* dialog = new ConstrainedWindowViews( 624 ConstrainedWindowViews* dialog = new ConstrainedWindowViews(
625 web_contents->GetNativeView(), 625 web_contents->GetNativeView(),
626 web_contents->GetBrowserContext()->IsOffTheRecord(), 626 web_contents->GetBrowserContext()->IsOffTheRecord(),
627 widget_delegate); 627 widget_delegate);
628 manager->AddDialog(dialog); 628 manager->AddDialog(dialog);
629 return dialog; 629 return dialog;
630 } 630 }
631 631
632 views::NonClientFrameView* ConstrainedWindowViews::CreateNonClientFrameView() { 632 views::NonClientFrameView* ConstrainedWindowViews::CreateNonClientFrameView() {
633 if (views::DialogDelegate::UseNewStyle()) 633 if (views::DialogDelegate::UseNewStyle())
634 return views::DialogDelegate::CreateNewStyleFrameView(this); 634 return views::DialogDelegate::CreateNewStyleFrameView(this);
635 #if defined(USE_ASH) 635 #if defined(USE_ASH)
636 ConstrainedWindowFrameViewAsh* frame = new ConstrainedWindowFrameViewAsh; 636 ConstrainedWindowFrameViewAsh* frame = new ConstrainedWindowFrameViewAsh;
637 frame->Init(this); 637 frame->Init(this);
638 return frame; 638 return frame;
639 #endif 639 #endif
640 return new ConstrainedWindowFrameView(this, off_the_record_); 640 return new ConstrainedWindowFrameView(this, off_the_record_);
641 } 641 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/constrained_window_views.h ('k') | chrome/browser/ui/views/web_contents_modal_dialog_manager_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698