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

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

Issue 697953002: ObserverList::HasObserver now takes a const pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 #ifndef UI_VIEWS_WIDGET_WIDGET_H_ 5 #ifndef UI_VIEWS_WIDGET_WIDGET_H_
6 #define UI_VIEWS_WIDGET_WIDGET_H_ 6 #define UI_VIEWS_WIDGET_WIDGET_H_
7 7
8 #include <set> 8 #include <set>
9 #include <stack> 9 #include <stack>
10 #include <vector> 10 #include <vector>
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 gfx::NativeView GetNativeView() const; 347 gfx::NativeView GetNativeView() const;
348 348
349 // Returns the gfx::NativeWindow associated with this Widget. This may return 349 // Returns the gfx::NativeWindow associated with this Widget. This may return
350 // NULL on some platforms if the widget was created with a type other than 350 // NULL on some platforms if the widget was created with a type other than
351 // TYPE_WINDOW or TYPE_PANEL. 351 // TYPE_WINDOW or TYPE_PANEL.
352 gfx::NativeWindow GetNativeWindow() const; 352 gfx::NativeWindow GetNativeWindow() const;
353 353
354 // Add/remove observer. 354 // Add/remove observer.
355 void AddObserver(WidgetObserver* observer); 355 void AddObserver(WidgetObserver* observer);
356 void RemoveObserver(WidgetObserver* observer); 356 void RemoveObserver(WidgetObserver* observer);
357 bool HasObserver(WidgetObserver* observer); 357 bool HasObserver(const WidgetObserver* observer) const;
358 358
359 // Add/remove removals observer. 359 // Add/remove removals observer.
360 void AddRemovalsObserver(WidgetRemovalsObserver* observer); 360 void AddRemovalsObserver(WidgetRemovalsObserver* observer);
361 void RemoveRemovalsObserver(WidgetRemovalsObserver* observer); 361 void RemoveRemovalsObserver(WidgetRemovalsObserver* observer);
362 bool HasRemovalsObserver(WidgetRemovalsObserver* observer); 362 bool HasRemovalsObserver(const WidgetRemovalsObserver* observer) const;
363 363
364 // Returns the accelerator given a command id. Returns false if there is 364 // Returns the accelerator given a command id. Returns false if there is
365 // no accelerator associated with a given id, which is a common condition. 365 // no accelerator associated with a given id, which is a common condition.
366 virtual bool GetAccelerator(int cmd_id, ui::Accelerator* accelerator) const; 366 virtual bool GetAccelerator(int cmd_id, ui::Accelerator* accelerator) const;
367 367
368 // Forwarded from the RootView so that the widget can do any cleanup. 368 // Forwarded from the RootView so that the widget can do any cleanup.
369 void ViewHierarchyChanged(const View::ViewHierarchyChangedDetails& details); 369 void ViewHierarchyChanged(const View::ViewHierarchyChangedDetails& details);
370 370
371 // Called right before changing the widget's parent NativeView to do any 371 // Called right before changing the widget's parent NativeView to do any
372 // cleanup. 372 // cleanup.
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 bool movement_disabled_; 945 bool movement_disabled_;
946 946
947 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_; 947 ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver> observer_manager_;
948 948
949 DISALLOW_COPY_AND_ASSIGN(Widget); 949 DISALLOW_COPY_AND_ASSIGN(Widget);
950 }; 950 };
951 951
952 } // namespace views 952 } // namespace views
953 953
954 #endif // UI_VIEWS_WIDGET_WIDGET_H_ 954 #endif // UI_VIEWS_WIDGET_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698