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

Side by Side Diff: chrome/browser/ui/views/global_error_bubble_view.h

Issue 10830366: Avoid overriding Bubble's GetAnchorRect() where possible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove a redundant DCHECK. Created 8 years, 4 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
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 CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/ui/global_error/global_error_bubble_view_base.h" 9 #include "chrome/browser/ui/global_error/global_error_bubble_view_base.h"
10 #include "ui/views/bubble/bubble_delegate.h" 10 #include "ui/views/bubble/bubble_delegate.h"
11 #include "ui/views/controls/button/button.h" 11 #include "ui/views/controls/button/button.h"
12 12
13 class Browser; 13 class Browser;
14 class GlobalError; 14 class GlobalError;
15 15
16 class GlobalErrorBubbleView : public views::ButtonListener, 16 class GlobalErrorBubbleView : public views::ButtonListener,
17 public views::BubbleDelegateView, 17 public views::BubbleDelegateView,
18 public GlobalErrorBubbleViewBase { 18 public GlobalErrorBubbleViewBase {
19 public: 19 public:
20 GlobalErrorBubbleView(views::View* anchor_view, 20 GlobalErrorBubbleView(views::View* anchor_view,
21 views::BubbleBorder::ArrowLocation location, 21 views::BubbleBorder::ArrowLocation location,
22 Browser* browser, 22 Browser* browser,
23 const base::WeakPtr<GlobalError>& error); 23 const base::WeakPtr<GlobalError>& error);
24 virtual ~GlobalErrorBubbleView(); 24 virtual ~GlobalErrorBubbleView();
25 25
26 // views::BubbleDelegateView implementation.
27 virtual gfx::Rect GetAnchorRect() OVERRIDE;
28
29 // views::ButtonListener implementation. 26 // views::ButtonListener implementation.
30 virtual void ButtonPressed(views::Button* sender, 27 virtual void ButtonPressed(views::Button* sender,
31 const ui::Event& event) OVERRIDE; 28 const ui::Event& event) OVERRIDE;
32 29
33 // views::WidgetDelegate implementation. 30 // views::WidgetDelegate implementation.
34 virtual void WindowClosing() OVERRIDE; 31 virtual void WindowClosing() OVERRIDE;
35 32
36 // GlobalErrorBubbleViewBase implementation. 33 // GlobalErrorBubbleViewBase implementation.
37 virtual void CloseBubbleView() OVERRIDE; 34 virtual void CloseBubbleView() OVERRIDE;
38 35
39 private: 36 private:
40 Browser* browser_; 37 Browser* browser_;
41 base::WeakPtr<GlobalError> error_; 38 base::WeakPtr<GlobalError> error_;
42 39
43 DISALLOW_COPY_AND_ASSIGN(GlobalErrorBubbleView); 40 DISALLOW_COPY_AND_ASSIGN(GlobalErrorBubbleView);
44 }; 41 };
45 42
46 #endif // CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_ 43 #endif // CHROME_BROWSER_UI_VIEWS_GLOBAL_ERROR_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/first_run_bubble.cc ('k') | chrome/browser/ui/views/global_error_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698