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

Side by Side Diff: ui/aura/window.h

Issue 8574033: Beginnings of Window Modality support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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
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 #ifndef UI_AURA_WINDOW_H_ 5 #ifndef UI_AURA_WINDOW_H_
6 #define UI_AURA_WINDOW_H_ 6 #define UI_AURA_WINDOW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 void ReleaseCapture(); 249 void ReleaseCapture();
250 250
251 // Returns true if this window has a mouse capture. 251 // Returns true if this window has a mouse capture.
252 bool HasCapture(); 252 bool HasCapture();
253 253
254 // Sets the window property |value| for given |name|. Setting NULL or 0 254 // Sets the window property |value| for given |name|. Setting NULL or 0
255 // removes the property. It uses |ui::ViewProp| to store the property. 255 // removes the property. It uses |ui::ViewProp| to store the property.
256 // Please see the description of |prop_map_| for more details. 256 // Please see the description of |prop_map_| for more details.
257 void SetProperty(const char* name, void* value); 257 void SetProperty(const char* name, void* value);
258 void SetIntProperty(const char* name, int value); 258 void SetIntProperty(const char* name, int value);
259 void SetBoolProperty(const char* name, bool value);
259 260
260 // Returns the window property for given |name|. Returns NULL or 0 if 261 // Returns the window property for given |name|. Returns NULL or 0 if
261 // the property does not exist. 262 // the property does not exist.
262 // TODO(oshima): Returning 0 for non existing property is problematic. 263 // TODO(oshima): Returning 0 for non existing property is problematic.
263 // Fix ViewProp to be able to tell if the property exists and 264 // Fix ViewProp to be able to tell if the property exists and
264 // change it to -1. 265 // change it to -1.
265 void* GetProperty(const char* name) const; 266 void* GetProperty(const char* name) const;
266 int GetIntProperty(const char* name) const; 267 int GetIntProperty(const char* name) const;
268 bool GetBoolProperty(const char* name) const;
267 269
268 protected: 270 protected:
269 // Returns the desktop or NULL if we aren't yet attached to a desktop. 271 // Returns the desktop or NULL if we aren't yet attached to a desktop.
270 virtual Desktop* GetDesktop(); 272 virtual Desktop* GetDesktop();
271 273
272 // Called when the |window| is detached from the desktop by being 274 // Called when the |window| is detached from the desktop by being
273 // removed from its parent. 275 // removed from its parent.
274 virtual void WindowDetachedFromDesktop(aura::Window* window); 276 virtual void WindowDetachedFromDesktop(aura::Window* window);
275 277
276 private: 278 private:
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 // TODO(oshima): Consolidcate ViewProp and aura::window property 350 // TODO(oshima): Consolidcate ViewProp and aura::window property
349 // implementation. 351 // implementation.
350 std::map<const char*, void*> prop_map_; 352 std::map<const char*, void*> prop_map_;
351 353
352 DISALLOW_COPY_AND_ASSIGN(Window); 354 DISALLOW_COPY_AND_ASSIGN(Window);
353 }; 355 };
354 356
355 } // namespace aura 357 } // namespace aura
356 358
357 #endif // UI_AURA_WINDOW_H_ 359 #endif // UI_AURA_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698