OLD | NEW |
---|---|
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_WIDGET_H_ | 5 #ifndef VIEWS_WIDGET_WIDGET_H_ |
6 #define VIEWS_WIDGET_WIDGET_H_ | 6 #define VIEWS_WIDGET_WIDGET_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
290 // _before_ the focus manager/tooltip manager. | 290 // _before_ the focus manager/tooltip manager. |
291 // TODO(beng): remove once we fold those objects onto this one. | 291 // TODO(beng): remove once we fold those objects onto this one. |
292 void DestroyRootView(); | 292 void DestroyRootView(); |
293 | 293 |
294 // TODO(beng): Temporarily provided as a way to associate the subclass' | 294 // TODO(beng): Temporarily provided as a way to associate the subclass' |
295 // implementation of NativeWidget with this. | 295 // implementation of NativeWidget with this. |
296 void set_native_widget(NativeWidget* native_widget) { | 296 void set_native_widget(NativeWidget* native_widget) { |
297 native_widget_ = native_widget; | 297 native_widget_ = native_widget; |
298 } | 298 } |
299 | 299 |
300 // Actually handle mouse events. These functions are called by subclasses who | |
301 // override the message handlers above to do the actual real work of handling | |
302 // the event in the View system. | |
303 bool ProcessMousePressed(const MouseEvent& event); | |
Ben Goodger (Google)
2011/03/30 23:22:55
I want you to rename these methods:
OnMousePresse
msw
2011/03/31 14:01:18
Done.
| |
304 bool ProcessMouseReleased(const MouseEvent& event); | |
305 void ProcessMouseMoved(const MouseEvent& event); | |
306 void ProcessMouseCaptureLost(); | |
307 | |
300 // Used for testing. | 308 // Used for testing. |
301 void ReplaceFocusManager(FocusManager* focus_manager); | 309 void ReplaceFocusManager(FocusManager* focus_manager); |
302 | 310 |
311 // If true, the mouse is currently down. | |
Ben Goodger (Google)
2011/03/30 23:22:55
Can you add a TODO to move these to private:?
msw
2011/03/31 14:01:18
Done.
| |
312 bool is_mouse_down_; | |
313 | |
314 // The following are used to detect duplicate mouse move events and not | |
315 // deliver them. Displaying a window may result in the system generating | |
316 // duplicate move events even though the mouse hasn't moved. | |
317 bool last_mouse_event_was_move_; | |
318 gfx::Point last_mouse_event_position_; | |
319 | |
303 private: | 320 private: |
304 // Refresh the compositor tree. This is called by a View whenever its texture | 321 // Refresh the compositor tree. This is called by a View whenever its texture |
305 // is updated. | 322 // is updated. |
306 void RefreshCompositeTree(); | 323 void RefreshCompositeTree(); |
307 | 324 |
308 // Try to create a compositor if one hasn't been created yet. Returns false if | 325 // Try to create a compositor if one hasn't been created yet. Returns false if |
309 // a compositor couldn't be created. | 326 // a compositor couldn't be created. |
310 bool EnsureCompositor(); | 327 bool EnsureCompositor(); |
311 | 328 |
312 NativeWidget* native_widget_; | 329 NativeWidget* native_widget_; |
(...skipping 22 matching lines...) Expand all Loading... | |
335 | 352 |
336 // The compositor for accelerated drawing. | 353 // The compositor for accelerated drawing. |
337 scoped_refptr<ui::Compositor> compositor_; | 354 scoped_refptr<ui::Compositor> compositor_; |
338 | 355 |
339 DISALLOW_COPY_AND_ASSIGN(Widget); | 356 DISALLOW_COPY_AND_ASSIGN(Widget); |
340 }; | 357 }; |
341 | 358 |
342 } // namespace views | 359 } // namespace views |
343 | 360 |
344 #endif // VIEWS_WIDGET_WIDGET_H_ | 361 #endif // VIEWS_WIDGET_WIDGET_H_ |
OLD | NEW |