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

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

Issue 7770002: gfx::Compositor: SchedulePaint. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 3 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 | « views/widget/native_widget_gtk.cc ('k') | views/widget/native_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) 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 VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_ 5 #ifndef VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_
6 #define VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_ 6 #define VIEWS_WIDGET_NATIVE_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/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
19 #include "base/memory/scoped_vector.h" 19 #include "base/memory/scoped_vector.h"
20 #include "base/message_loop.h" 20 #include "base/message_loop.h"
21 #include "base/win/scoped_comptr.h" 21 #include "base/win/scoped_comptr.h"
22 #include "base/win/win_util.h" 22 #include "base/win/win_util.h"
23 #include "ui/base/win/window_impl.h" 23 #include "ui/base/win/window_impl.h"
24 #include "ui/gfx/compositor/compositor.h"
24 #include "views/focus/focus_manager.h" 25 #include "views/focus/focus_manager.h"
25 #include "views/layout/layout_manager.h" 26 #include "views/layout/layout_manager.h"
26 #include "views/widget/native_widget_private.h" 27 #include "views/widget/native_widget_private.h"
27 28
28 namespace ui { 29 namespace ui {
29 class Compositor; 30 class Compositor;
30 class ViewProp; 31 class ViewProp;
31 } 32 }
32 33
33 namespace gfx { 34 namespace gfx {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // suitable for specific tasks, e.g. top level window, are derived from this. 73 // suitable for specific tasks, e.g. top level window, are derived from this.
73 // 74 //
74 // This Widget contains a RootView which owns the hierarchy of views within it. 75 // This Widget contains a RootView which owns the hierarchy of views within it.
75 // As long as views are part of this tree, they will be deleted automatically 76 // As long as views are part of this tree, they will be deleted automatically
76 // when the RootView is destroyed. If you remove a view from the tree, you are 77 // when the RootView is destroyed. If you remove a view from the tree, you are
77 // then responsible for cleaning up after it. 78 // then responsible for cleaning up after it.
78 // 79 //
79 /////////////////////////////////////////////////////////////////////////////// 80 ///////////////////////////////////////////////////////////////////////////////
80 class VIEWS_EXPORT NativeWidgetWin : public ui::WindowImpl, 81 class VIEWS_EXPORT NativeWidgetWin : public ui::WindowImpl,
81 public MessageLoopForUI::Observer, 82 public MessageLoopForUI::Observer,
83 public ui::CompositorDelegate,
82 public internal::NativeWidgetPrivate { 84 public internal::NativeWidgetPrivate {
83 public: 85 public:
84 explicit NativeWidgetWin(internal::NativeWidgetDelegate* delegate); 86 explicit NativeWidgetWin(internal::NativeWidgetDelegate* delegate);
85 virtual ~NativeWidgetWin(); 87 virtual ~NativeWidgetWin();
86 88
87 // Returns true if we are on Windows Vista or greater and composition is 89 // Returns true if we are on Windows Vista or greater and composition is
88 // enabled. 90 // enabled.
89 static bool IsAeroGlassEnabled(); 91 static bool IsAeroGlassEnabled();
90 92
91 // Returns the system set window title font. 93 // Returns the system set window title font.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 int SetWindowRgn(HRGN region, BOOL redraw) { 175 int SetWindowRgn(HRGN region, BOOL redraw) {
174 DCHECK(::IsWindow(GetNativeView())); 176 DCHECK(::IsWindow(GetNativeView()));
175 return ::SetWindowRgn(GetNativeView(), region, redraw); 177 return ::SetWindowRgn(GetNativeView(), region, redraw);
176 } 178 }
177 179
178 BOOL GetClientRect(RECT* rect) const { 180 BOOL GetClientRect(RECT* rect) const {
179 DCHECK(::IsWindow(GetNativeView())); 181 DCHECK(::IsWindow(GetNativeView()));
180 return ::GetClientRect(GetNativeView(), rect); 182 return ::GetClientRect(GetNativeView(), rect);
181 } 183 }
182 184
185 // Overridden from ui::CompositorDelegate:
186 virtual void ScheduleCompositorPaint();
187
183 // Overridden from internal::NativeWidgetPrivate: 188 // Overridden from internal::NativeWidgetPrivate:
184 virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE; 189 virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE;
185 virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE; 190 virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE;
186 virtual void UpdateFrameAfterFrameChange() OVERRIDE; 191 virtual void UpdateFrameAfterFrameChange() OVERRIDE;
187 virtual bool ShouldUseNativeFrame() const OVERRIDE; 192 virtual bool ShouldUseNativeFrame() const OVERRIDE;
188 virtual void FrameTypeChanged() OVERRIDE; 193 virtual void FrameTypeChanged() OVERRIDE;
189 virtual Widget* GetWidget() OVERRIDE; 194 virtual Widget* GetWidget() OVERRIDE;
190 virtual const Widget* GetWidget() const OVERRIDE; 195 virtual const Widget* GetWidget() const OVERRIDE;
191 virtual gfx::NativeView GetNativeView() const OVERRIDE; 196 virtual gfx::NativeView GetNativeView() const OVERRIDE;
192 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; 197 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE;
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 649
645 // The compositor for accelerated drawing. 650 // The compositor for accelerated drawing.
646 scoped_refptr<ui::Compositor> compositor_; 651 scoped_refptr<ui::Compositor> compositor_;
647 652
648 DISALLOW_COPY_AND_ASSIGN(NativeWidgetWin); 653 DISALLOW_COPY_AND_ASSIGN(NativeWidgetWin);
649 }; 654 };
650 655
651 } // namespace views 656 } // namespace views
652 657
653 #endif // VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_ 658 #endif // VIEWS_WIDGET_NATIVE_WIDGET_WIN_H_
OLDNEW
« no previous file with comments | « views/widget/native_widget_gtk.cc ('k') | views/widget/native_widget_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698