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

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

Issue 11418224: Eliminates all ash dependencies from WindowModalityController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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
« no previous file with comments | « ash/wm/window_util.cc ('k') | ui/aura/client/activation_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 registrar_.Add(this, 625 registrar_.Add(this,
626 content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED, 626 content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED,
627 content::Source<content::WebContents>(web_contents)); 627 content::Source<content::WebContents>(web_contents));
628 } 628 }
629 629
630 ConstrainedWindowTabHelper* constrained_window_tab_helper = 630 ConstrainedWindowTabHelper* constrained_window_tab_helper =
631 ConstrainedWindowTabHelper::FromWebContents(web_contents_); 631 ConstrainedWindowTabHelper::FromWebContents(web_contents_);
632 constrained_window_tab_helper->AddConstrainedDialog(this); 632 constrained_window_tab_helper->AddConstrainedDialog(this);
633 #if defined(USE_ASH) 633 #if defined(USE_ASH)
634 GetNativeWindow()->SetProperty(ash::kConstrainedWindowKey, true); 634 GetNativeWindow()->SetProperty(ash::kConstrainedWindowKey, true);
635 ash::wm::SetModalParent(GetNativeWindow(), 635 ash::SetModalParent(GetNativeWindow(),
636 web_contents_->GetView()->GetNativeView()); 636 web_contents_->GetView()->GetNativeView());
637 #endif 637 #endif
638 } 638 }
639 639
640 ConstrainedWindowViews::~ConstrainedWindowViews() { 640 ConstrainedWindowViews::~ConstrainedWindowViews() {
641 } 641 }
642 642
643 void ConstrainedWindowViews::ShowConstrainedWindow() { 643 void ConstrainedWindowViews::ShowConstrainedWindow() {
644 #if defined(USE_AURA) 644 #if defined(USE_AURA)
645 if (enable_chrome_style_) { 645 if (enable_chrome_style_) {
646 views::corewm::SetWindowVisibilityAnimationType( 646 views::corewm::SetWindowVisibilityAnimationType(
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 return; 764 return;
765 } 765 }
766 #if defined(USE_ASH) 766 #if defined(USE_ASH)
767 if (is_top_level()) { 767 if (is_top_level()) {
768 point += web_contents_->GetNativeView()->parent()->bounds().origin(). 768 point += web_contents_->GetNativeView()->parent()->bounds().origin().
769 OffsetFromOrigin(); 769 OffsetFromOrigin();
770 } 770 }
771 #endif 771 #endif
772 SetBounds(gfx::Rect(point - gfx::Vector2d(size.width() / 2, 0), size)); 772 SetBounds(gfx::Rect(point - gfx::Vector2d(size.width() / 2, 0), size));
773 } 773 }
OLDNEW
« no previous file with comments | « ash/wm/window_util.cc ('k') | ui/aura/client/activation_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698