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

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

Issue 8052019: Create constrained windows in a hidden state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and address comments Created 9 years, 1 month 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 | « no previous file | chrome/browser/ui/views/constrained_window_views_browsertest.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 wrapper_->constrained_window_tab_helper()->AddConstrainedDialog(this); 613 wrapper_->constrained_window_tab_helper()->AddConstrainedDialog(this);
614 } 614 }
615 615
616 ConstrainedWindowViews::~ConstrainedWindowViews() { 616 ConstrainedWindowViews::~ConstrainedWindowViews() {
617 } 617 }
618 618
619 //////////////////////////////////////////////////////////////////////////////// 619 ////////////////////////////////////////////////////////////////////////////////
620 // ConstrainedWindowViews, ConstrainedWindow implementation: 620 // ConstrainedWindowViews, ConstrainedWindow implementation:
621 621
622 void ConstrainedWindowViews::ShowConstrainedWindow() { 622 void ConstrainedWindowViews::ShowConstrainedWindow() {
623 // We marked the view as hidden during construction. Mark it as
624 // visible now so FocusManager will let us receive focus.
625 non_client_view()->SetVisible(true);
626 ConstrainedWindowTabHelper* helper = 623 ConstrainedWindowTabHelper* helper =
627 wrapper_->constrained_window_tab_helper(); 624 wrapper_->constrained_window_tab_helper();
628 if (helper && helper->delegate()) 625 if (helper && helper->delegate())
629 helper->delegate()->WillShowConstrainedWindow(wrapper_); 626 helper->delegate()->WillShowConstrainedWindow(wrapper_);
630 Activate(); 627 Show();
631 FocusConstrainedWindow(); 628 FocusConstrainedWindow();
632 } 629 }
633 630
634 void ConstrainedWindowViews::CloseConstrainedWindow() { 631 void ConstrainedWindowViews::CloseConstrainedWindow() {
635 wrapper_->constrained_window_tab_helper()->WillClose(this); 632 wrapper_->constrained_window_tab_helper()->WillClose(this);
636 Close(); 633 Close();
637 } 634 }
638 635
639 void ConstrainedWindowViews::FocusConstrainedWindow() { 636 void ConstrainedWindowViews::FocusConstrainedWindow() {
640 ConstrainedWindowTabHelper* helper = 637 ConstrainedWindowTabHelper* helper =
(...skipping 21 matching lines...) Expand all
662 } 659 }
663 660
664 void ConstrainedWindowViews::OnNativeConstrainedWindowMouseActivate() { 661 void ConstrainedWindowViews::OnNativeConstrainedWindowMouseActivate() {
665 Activate(); 662 Activate();
666 } 663 }
667 664
668 views::internal::NativeWidgetDelegate* 665 views::internal::NativeWidgetDelegate*
669 ConstrainedWindowViews::AsNativeWidgetDelegate() { 666 ConstrainedWindowViews::AsNativeWidgetDelegate() {
670 return this; 667 return this;
671 } 668 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/constrained_window_views_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698