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

Side by Side Diff: chrome/browser/ui/views/message_center/message_center_widget_delegate.h

Issue 628773002: replace OVERRIDE and FINAL with override and final in chrome/browser/ui/[t-v]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_MESSAGE_CENTER_WIDGET_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_MESSAGE_CENTER_WIDGET_DELEGATE_H_
6 #define CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_MESSAGE_CENTER_WIDGET_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_MESSAGE_CENTER_WIDGET_DELEGATE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 public views::WidgetObserver { 53 public views::WidgetObserver {
54 public: 54 public:
55 MessageCenterWidgetDelegate(WebNotificationTray* tray, 55 MessageCenterWidgetDelegate(WebNotificationTray* tray,
56 MessageCenterTray* mc_tray, 56 MessageCenterTray* mc_tray,
57 bool initially_settings_visible, 57 bool initially_settings_visible,
58 const PositionInfo& pos_info, 58 const PositionInfo& pos_info,
59 const base::string16& title); 59 const base::string16& title);
60 virtual ~MessageCenterWidgetDelegate(); 60 virtual ~MessageCenterWidgetDelegate();
61 61
62 // WidgetDelegate overrides: 62 // WidgetDelegate overrides:
63 virtual View* GetContentsView() OVERRIDE; 63 virtual View* GetContentsView() override;
64 virtual views::NonClientFrameView* CreateNonClientFrameView( 64 virtual views::NonClientFrameView* CreateNonClientFrameView(
65 views::Widget* widget) OVERRIDE; 65 views::Widget* widget) override;
66 virtual void DeleteDelegate() OVERRIDE; 66 virtual void DeleteDelegate() override;
67 virtual views::Widget* GetWidget() OVERRIDE; 67 virtual views::Widget* GetWidget() override;
68 virtual const views::Widget* GetWidget() const OVERRIDE; 68 virtual const views::Widget* GetWidget() const override;
69 69
70 // WidgetObserver overrides: 70 // WidgetObserver overrides:
71 virtual void OnWidgetActivationChanged(views::Widget* widget, 71 virtual void OnWidgetActivationChanged(views::Widget* widget,
72 bool active) OVERRIDE; 72 bool active) override;
73 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; 73 virtual void OnWidgetClosing(views::Widget* widget) override;
74 74
75 // View overrides: 75 // View overrides:
76 virtual void PreferredSizeChanged() OVERRIDE; 76 virtual void PreferredSizeChanged() override;
77 virtual gfx::Size GetPreferredSize() const OVERRIDE; 77 virtual gfx::Size GetPreferredSize() const override;
78 virtual gfx::Size GetMaximumSize() const OVERRIDE; 78 virtual gfx::Size GetMaximumSize() const override;
79 virtual int GetHeightForWidth(int width) const OVERRIDE; 79 virtual int GetHeightForWidth(int width) const override;
80 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; 80 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
81 81
82 private: 82 private:
83 // Creates and initializes the message center widget. 83 // Creates and initializes the message center widget.
84 void InitWidget(); 84 void InitWidget();
85 85
86 // Shifts the message center anchor point such that the mouse click point is 86 // Shifts the message center anchor point such that the mouse click point is
87 // along the middle 60% of the width of the message center if taskbar is 87 // along the middle 60% of the width of the message center if taskbar is
88 // horizontal aligned. If vertically aligned, ensures that mouse click point 88 // horizontal aligned. If vertically aligned, ensures that mouse click point
89 // is along the height of the message center (at least at a corner). 89 // is along the height of the message center (at least at a corner).
90 gfx::Point GetCorrectedAnchor(gfx::Size calculated_size); 90 gfx::Point GetCorrectedAnchor(gfx::Size calculated_size);
91 91
92 // Calculates the message center bounds using the position info and the 92 // Calculates the message center bounds using the position info and the
93 // corrected anchor. 93 // corrected anchor.
94 gfx::Rect GetMessageCenterBounds(); 94 gfx::Rect GetMessageCenterBounds();
95 95
96 // Insets of the message center border (set in MessageCenterFrameView). 96 // Insets of the message center border (set in MessageCenterFrameView).
97 gfx::Insets border_insets_; 97 gfx::Insets border_insets_;
98 98
99 // Info necessary to calculate the estimated position of the message center. 99 // Info necessary to calculate the estimated position of the message center.
100 PositionInfo pos_info_; 100 PositionInfo pos_info_;
101 101
102 WebNotificationTray* tray_; 102 WebNotificationTray* tray_;
103 }; 103 };
104 104
105 } // namespace message_center 105 } // namespace message_center
106 106
107 #endif // CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_MESSAGE_CENTER_WIDGET_DELEGATE _H_ 107 #endif // CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_MESSAGE_CENTER_WIDGET_DELEGATE _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698