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

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 Created 9 years, 2 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
« 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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 // desktop. This is necessary for key events to work under views desktop 597 // desktop. This is necessary for key events to work under views desktop
598 // because key events need to be sent to toplevel window 598 // because key events need to be sent to toplevel window
599 // which has an inputmethod object that knows where to forward 599 // which has an inputmethod object that knows where to forward
600 // event. 600 // event.
601 } else { 601 } else {
602 params.child = true; 602 params.child = true;
603 params.parent = wrapper->tab_contents()->GetNativeView(); 603 params.parent = wrapper->tab_contents()->GetNativeView();
604 } 604 }
605 605
606 Init(params); 606 Init(params);
607 607 // Views default to visible. Since we are creating a window that is not
608 // visible, mark our View as hidden. This lets us manage accelerator
609 // registration and focus in a manner consistent with visibility.
Ben Goodger (Google) 2011/10/26 18:04:58 Seems like the NCV should just defer registration
asanka 2011/10/26 18:46:25 Yeah. I think that would be better. Views::Registe
610 non_client_view()->SetVisible(false);
608 wrapper_->constrained_window_tab_helper()->AddConstrainedDialog(this); 611 wrapper_->constrained_window_tab_helper()->AddConstrainedDialog(this);
609 } 612 }
610 613
611 ConstrainedWindowViews::~ConstrainedWindowViews() { 614 ConstrainedWindowViews::~ConstrainedWindowViews() {
612 } 615 }
613 616
614 //////////////////////////////////////////////////////////////////////////////// 617 ////////////////////////////////////////////////////////////////////////////////
615 // ConstrainedWindowViews, ConstrainedWindow implementation: 618 // ConstrainedWindowViews, ConstrainedWindow implementation:
616 619
617 void ConstrainedWindowViews::ShowConstrainedWindow() { 620 void ConstrainedWindowViews::ShowConstrainedWindow() {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 } 660 }
658 661
659 void ConstrainedWindowViews::OnNativeConstrainedWindowMouseActivate() { 662 void ConstrainedWindowViews::OnNativeConstrainedWindowMouseActivate() {
660 Activate(); 663 Activate();
661 } 664 }
662 665
663 views::internal::NativeWidgetDelegate* 666 views::internal::NativeWidgetDelegate*
664 ConstrainedWindowViews::AsNativeWidgetDelegate() { 667 ConstrainedWindowViews::AsNativeWidgetDelegate() {
665 return this; 668 return this;
666 } 669 }
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