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

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

Issue 12224020: Use gfx::NativeView rather than gfx::NativeWindow to identify web contents modal dialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 #if defined(USE_ASH) 600 #if defined(USE_ASH)
601 // We don't necessarily have a RootWindow yet. 601 // We don't necessarily have a RootWindow yet.
602 if (GetNativeView()->GetRootWindow()) 602 if (GetNativeView()->GetRootWindow())
603 GetNativeView()->Focus(); 603 GetNativeView()->Focus();
604 #endif 604 #endif
605 } 605 }
606 606
607 void ConstrainedWindowViews::PulseWebContentsModalDialog() { 607 void ConstrainedWindowViews::PulseWebContentsModalDialog() {
608 } 608 }
609 609
610 gfx::NativeWindow ConstrainedWindowViews::GetNativeWindow() { 610 gfx::NativeView ConstrainedWindowViews::GetNativeView() {
611 return Widget::GetNativeWindow(); 611 return Widget::GetNativeView();
612 } 612 }
613 613
614 ConstrainedWindowViews* ConstrainedWindowViews::Create( 614 ConstrainedWindowViews* ConstrainedWindowViews::Create(
615 content::WebContents* web_contents, 615 content::WebContents* web_contents,
616 views::WidgetDelegate* widget_delegate) { 616 views::WidgetDelegate* widget_delegate) {
617 WebContentsModalDialogManager* manager = 617 WebContentsModalDialogManager* manager =
618 WebContentsModalDialogManager::FromWebContents(web_contents); 618 WebContentsModalDialogManager::FromWebContents(web_contents);
619 ConstrainedWindowViews* dialog = new ConstrainedWindowViews( 619 ConstrainedWindowViews* dialog = new ConstrainedWindowViews(
620 web_contents->GetNativeView(), 620 web_contents->GetNativeView(),
621 web_contents->GetBrowserContext()->IsOffTheRecord(), 621 web_contents->GetBrowserContext()->IsOffTheRecord(),
622 widget_delegate); 622 widget_delegate);
623 manager->AddDialog(dialog); 623 manager->AddDialog(dialog);
624 return dialog; 624 return dialog;
625 } 625 }
626 626
627 views::NonClientFrameView* ConstrainedWindowViews::CreateNonClientFrameView() { 627 views::NonClientFrameView* ConstrainedWindowViews::CreateNonClientFrameView() {
628 if (views::DialogDelegate::UseNewStyle()) 628 if (views::DialogDelegate::UseNewStyle())
629 return new views::DialogFrameView(widget_delegate()->GetWindowTitle()); 629 return new views::DialogFrameView(widget_delegate()->GetWindowTitle());
630 #if defined(USE_ASH) 630 #if defined(USE_ASH)
631 ConstrainedWindowFrameViewAsh* frame = new ConstrainedWindowFrameViewAsh; 631 ConstrainedWindowFrameViewAsh* frame = new ConstrainedWindowFrameViewAsh;
632 frame->Init(this); 632 frame->Init(this);
633 return frame; 633 return frame;
634 #endif 634 #endif
635 return new ConstrainedWindowFrameView(this, off_the_record_); 635 return new ConstrainedWindowFrameView(this, off_the_record_);
636 } 636 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698