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

Side by Side Diff: views/widget/widget_win.h

Issue 5144005: Converts usage of SetProp/GetProp to a map. Even after making sure we (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Fix build Created 10 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 | « views/widget/widget_gtk.cc ('k') | views/widget/widget_win.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 VIEWS_WIDGET_WIDGET_WIN_H_ 5 #ifndef VIEWS_WIDGET_WIDGET_WIN_H_
6 #define VIEWS_WIDGET_WIDGET_WIN_H_ 6 #define VIEWS_WIDGET_WIDGET_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <atlbase.h> 9 #include <atlbase.h>
10 #include <atlapp.h> 10 #include <atlapp.h>
11 #include <atlcrack.h> 11 #include <atlcrack.h>
12 #include <atlmisc.h> 12 #include <atlmisc.h>
13 13
14 #include <string> 14 #include <string>
15 #include <vector> 15 #include <vector>
16 16
17 #include "base/message_loop.h" 17 #include "base/message_loop.h"
18 #include "base/scoped_comptr_win.h" 18 #include "base/scoped_comptr_win.h"
19 #include "base/scoped_vector.h" 19 #include "base/scoped_vector.h"
20 #include "gfx/window_impl.h" 20 #include "gfx/window_impl.h"
21 #include "views/focus/focus_manager.h" 21 #include "views/focus/focus_manager.h"
22 #include "views/layout_manager.h" 22 #include "views/layout_manager.h"
23 #include "views/widget/widget.h" 23 #include "views/widget/widget.h"
24 24
25 namespace app { 25 namespace app {
26 namespace win { 26 class ViewProp;
27 class ScopedProp;
28 }
29 } 27 }
30 28
31 namespace gfx { 29 namespace gfx {
32 class CanvasSkia; 30 class CanvasSkia;
33 class Rect; 31 class Rect;
34 } 32 }
35 33
36 namespace views { 34 namespace views {
37 35
38 class DefaultThemeProvider; 36 class DefaultThemeProvider;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 virtual Widget* GetRootWidget() const; 225 virtual Widget* GetRootWidget() const;
228 virtual bool IsVisible() const; 226 virtual bool IsVisible() const;
229 virtual bool IsActive() const; 227 virtual bool IsActive() const;
230 virtual bool IsAccessibleWidget() const; 228 virtual bool IsAccessibleWidget() const;
231 virtual TooltipManager* GetTooltipManager(); 229 virtual TooltipManager* GetTooltipManager();
232 virtual void GenerateMousePressedForView(View* view, 230 virtual void GenerateMousePressedForView(View* view,
233 const gfx::Point& point); 231 const gfx::Point& point);
234 virtual bool GetAccelerator(int cmd_id, menus::Accelerator* accelerator); 232 virtual bool GetAccelerator(int cmd_id, menus::Accelerator* accelerator);
235 virtual Window* GetWindow(); 233 virtual Window* GetWindow();
236 virtual const Window* GetWindow() const; 234 virtual const Window* GetWindow() const;
237 virtual void SetNativeWindowProperty(const std::wstring& name, 235 virtual void SetNativeWindowProperty(const char* name, void* value);
238 void* value); 236 virtual void* GetNativeWindowProperty(const char* name);
239 virtual void* GetNativeWindowProperty(const std::wstring& name);
240 virtual ThemeProvider* GetThemeProvider() const; 237 virtual ThemeProvider* GetThemeProvider() const;
241 virtual ThemeProvider* GetDefaultThemeProvider() const; 238 virtual ThemeProvider* GetDefaultThemeProvider() const;
242 virtual FocusManager* GetFocusManager(); 239 virtual FocusManager* GetFocusManager();
243 virtual void ViewHierarchyChanged(bool is_add, View *parent, 240 virtual void ViewHierarchyChanged(bool is_add, View *parent,
244 View *child); 241 View *child);
245 virtual bool ContainsNativeView(gfx::NativeView native_view); 242 virtual bool ContainsNativeView(gfx::NativeView native_view);
246 243
247 // Overridden from MessageLoop::Observer: 244 // Overridden from MessageLoop::Observer:
248 void WillProcessMessage(const MSG& msg); 245 void WillProcessMessage(const MSG& msg);
249 virtual void DidProcessMessage(const MSG& msg); 246 virtual void DidProcessMessage(const MSG& msg);
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 // Whether or not we have capture the mouse. 477 // Whether or not we have capture the mouse.
481 bool has_capture_; 478 bool has_capture_;
482 479
483 // If true, the mouse is currently down. 480 // If true, the mouse is currently down.
484 bool is_mouse_down_; 481 bool is_mouse_down_;
485 482
486 // Are a subclass of WindowWin? 483 // Are a subclass of WindowWin?
487 bool is_window_; 484 bool is_window_;
488 485
489 private: 486 private:
490 typedef ScopedVector<app::win::ScopedProp> ScopedProps; 487 typedef ScopedVector<app::ViewProp> ViewProps;
491 488
492 // Implementation of GetWindow. Ascends the parents of |hwnd| returning the 489 // Implementation of GetWindow. Ascends the parents of |hwnd| returning the
493 // first ancestor that is a Window. 490 // first ancestor that is a Window.
494 static Window* GetWindowImpl(HWND hwnd); 491 static Window* GetWindowImpl(HWND hwnd);
495 492
496 // Resize the bitmap used to contain the contents of the layered window. This 493 // Resize the bitmap used to contain the contents of the layered window. This
497 // recreates the entire bitmap. 494 // recreates the entire bitmap.
498 void SizeContents(const gfx::Size& window_size); 495 void SizeContents(const gfx::Size& window_size);
499 496
500 // Paint into a DIB and then update the layered window with its contents. 497 // Paint into a DIB and then update the layered window with its contents.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 static const int kMaxAccessibilityViewEvents = 20; 585 static const int kMaxAccessibilityViewEvents = 20;
589 586
590 // A vector used to access views for which we have sent notifications to 587 // A vector used to access views for which we have sent notifications to
591 // accessibility clients. It is used as a circular queue. 588 // accessibility clients. It is used as a circular queue.
592 std::vector<View*> accessibility_view_events_; 589 std::vector<View*> accessibility_view_events_;
593 590
594 // The current position of the view events vector. When incrementing, 591 // The current position of the view events vector. When incrementing,
595 // we always mod this value with the max view events above . 592 // we always mod this value with the max view events above .
596 int accessibility_view_events_index_; 593 int accessibility_view_events_index_;
597 594
598 ScopedProps props_; 595 ViewProps props_;
599 596
600 DISALLOW_COPY_AND_ASSIGN(WidgetWin); 597 DISALLOW_COPY_AND_ASSIGN(WidgetWin);
601 }; 598 };
602 599
603 } // namespace views 600 } // namespace views
604 601
605 #endif // VIEWS_WIDGET_WIDGET_WIN_H_ 602 #endif // VIEWS_WIDGET_WIDGET_WIN_H_
OLDNEW
« no previous file with comments | « views/widget/widget_gtk.cc ('k') | views/widget/widget_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698