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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_root_window_host_win.cc

Issue 100173003: Cursor state should be global among all root windows for desktop Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make DesktopNativeCursorManager a WindowObserver Created 7 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 | « ui/views/widget/desktop_aura/desktop_native_widget_aura.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_aura/desktop_root_window_host_win.h" 5 #include "ui/views/widget/desktop_aura/desktop_root_window_host_win.h"
6 6
7 #include "base/win/metro.h" 7 #include "base/win/metro.h"
8 #include "third_party/skia/include/core/SkPath.h" 8 #include "third_party/skia/include/core/SkPath.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 message_handler_->Init(parent_hwnd, pixel_bounds); 144 message_handler_->Init(parent_hwnd, pixel_bounds);
145 145
146 rw_create_params->host = this; 146 rw_create_params->host = this;
147 } 147 }
148 148
149 void DesktopRootWindowHostWin::OnRootWindowCreated( 149 void DesktopRootWindowHostWin::OnRootWindowCreated(
150 aura::RootWindow* root, 150 aura::RootWindow* root,
151 const Widget::InitParams& params) { 151 const Widget::InitParams& params) {
152 root_window_ = root; 152 root_window_ = root;
153 153
154 // The cursor is not necessarily visible when the root window is created.
155 aura::client::CursorClient* cursor_client =
156 aura::client::GetCursorClient(root_window_->window());
157 if (cursor_client)
158 is_cursor_visible_ = cursor_client->IsCursorVisible();
159
154 root_window_->window()->SetProperty(kContentWindowForRootWindow, 160 root_window_->window()->SetProperty(kContentWindowForRootWindow,
155 content_window_); 161 content_window_);
156 root_window_->window()->SetProperty(kDesktopRootWindowHostKey, this); 162 root_window_->window()->SetProperty(kDesktopRootWindowHostKey, this);
157 163
158 should_animate_window_close_ = 164 should_animate_window_close_ =
159 content_window_->type() != aura::client::WINDOW_TYPE_NORMAL && 165 content_window_->type() != aura::client::WINDOW_TYPE_NORMAL &&
160 !views::corewm::WindowAnimationsDisabled(content_window_); 166 !views::corewm::WindowAnimationsDisabled(content_window_);
161 167
162 // TODO this is not invoked *after* Init(), but should be ok. 168 // TODO this is not invoked *after* Init(), but should be ok.
163 SetWindowTransparency(); 169 SetWindowTransparency();
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 964
959 // static 965 // static
960 DesktopRootWindowHost* DesktopRootWindowHost::Create( 966 DesktopRootWindowHost* DesktopRootWindowHost::Create(
961 internal::NativeWidgetDelegate* native_widget_delegate, 967 internal::NativeWidgetDelegate* native_widget_delegate,
962 DesktopNativeWidgetAura* desktop_native_widget_aura) { 968 DesktopNativeWidgetAura* desktop_native_widget_aura) {
963 return new DesktopRootWindowHostWin(native_widget_delegate, 969 return new DesktopRootWindowHostWin(native_widget_delegate,
964 desktop_native_widget_aura); 970 desktop_native_widget_aura);
965 } 971 }
966 972
967 } // namespace views 973 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698