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

Side by Side Diff: ui/views/widget/desktop_native_widget_helper_aura.cc

Issue 10407022: Make Chrome limp briefly before freaking out with aura no ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 | « ui/aura/desktop/desktop_stacking_client.cc ('k') | no next file » | 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 "ui/views/widget/desktop_native_widget_helper_aura.h" 5 #include "ui/views/widget/desktop_native_widget_helper_aura.h"
6 6
7 #include "ui/aura/root_window.h" 7 #include "ui/aura/root_window.h"
8 #include "ui/aura/desktop/desktop_activation_client.h" 8 #include "ui/aura/desktop/desktop_activation_client.h"
9 #include "ui/aura/desktop/desktop_dispatcher_client.h" 9 #include "ui/aura/desktop/desktop_dispatcher_client.h"
10 #include "ui/aura/client/dispatcher_client.h" 10 #include "ui/aura/client/dispatcher_client.h"
(...skipping 15 matching lines...) Expand all
26 is_embedded_window_(false) { 26 is_embedded_window_(false) {
27 } 27 }
28 28
29 DesktopNativeWidgetHelperAura::~DesktopNativeWidgetHelperAura() { 29 DesktopNativeWidgetHelperAura::~DesktopNativeWidgetHelperAura() {
30 if (root_window_event_filter_) 30 if (root_window_event_filter_)
31 root_window_event_filter_->RemoveFilter(input_method_filter_.get()); 31 root_window_event_filter_->RemoveFilter(input_method_filter_.get());
32 } 32 }
33 33
34 void DesktopNativeWidgetHelperAura::PreInitialize( 34 void DesktopNativeWidgetHelperAura::PreInitialize(
35 const Widget::InitParams& params) { 35 const Widget::InitParams& params) {
36 #if !defined(OS_WIN)
36 // We don't want the status bubble or the omnibox to get their own root 37 // We don't want the status bubble or the omnibox to get their own root
37 // window on the desktop; on Linux 38 // window on the desktop; on Linux
38 // 39 //
39 // TODO(erg): This doesn't map perfectly to what I want to do. TYPE_POPUP is 40 // TODO(erg): This doesn't map perfectly to what I want to do. TYPE_POPUP is
40 // used for lots of stuff, like dragged tabs, and I only want this to trigger 41 // used for lots of stuff, like dragged tabs, and I only want this to trigger
41 // for the status bubble and the omnibox. 42 // for the status bubble and the omnibox.
42 if (params.type == Widget::InitParams::TYPE_POPUP) { 43 if (params.type == Widget::InitParams::TYPE_POPUP) {
43 is_embedded_window_ = true; 44 is_embedded_window_ = true;
44 return; 45 return;
45 } else if (params.type == Widget::InitParams::TYPE_CONTROL) { 46 } else if (params.type == Widget::InitParams::TYPE_CONTROL) {
46 return; 47 return;
47 } 48 }
49 #endif
48 50
49 gfx::Rect bounds = params.bounds; 51 gfx::Rect bounds = params.bounds;
50 if (bounds.IsEmpty()) { 52 if (bounds.IsEmpty()) {
51 // We must pass some non-zero value when we initialize a RootWindow. This 53 // We must pass some non-zero value when we initialize a RootWindow. This
52 // will probably be SetBounds()ed soon. 54 // will probably be SetBounds()ed soon.
53 bounds.set_size(gfx::Size(100, 100)); 55 bounds.set_size(gfx::Size(100, 100));
54 } 56 }
55 root_window_.reset(new aura::RootWindow(bounds)); 57 root_window_.reset(new aura::RootWindow(bounds));
56 root_window_->Init(); 58 root_window_->Init();
57 59
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 root->GetHostSize())); 136 root->GetHostSize()));
135 } 137 }
136 138
137 void DesktopNativeWidgetHelperAura::OnRootWindowHostClosed( 139 void DesktopNativeWidgetHelperAura::OnRootWindowHostClosed(
138 const aura::RootWindow* root) { 140 const aura::RootWindow* root) {
139 DCHECK_EQ(root, root_window_.get()); 141 DCHECK_EQ(root, root_window_.get());
140 widget_->GetWidget()->Close(); 142 widget_->GetWidget()->Close();
141 } 143 }
142 144
143 } // namespace views 145 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/desktop/desktop_stacking_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698