| OLD | NEW |
| 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_CONFIRM_BUBBLE_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_CONFIRM_BUBBLE_VIEWS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_CONFIRM_BUBBLE_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_CONFIRM_BUBBLE_VIEWS_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/views/bubble/bubble_delegate.h" | 10 #include "ui/views/bubble/bubble_delegate.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // | icon title x | | 29 // | icon title x | |
| 30 // | message | | 30 // | message | |
| 31 // | link | | 31 // | link | |
| 32 // | [OK] [Cancel] | | 32 // | [OK] [Cancel] | |
| 33 // +------------------------+ | 33 // +------------------------+ |
| 34 // | 34 // |
| 35 class ConfirmBubbleViews : public views::BubbleDelegateView, | 35 class ConfirmBubbleViews : public views::BubbleDelegateView, |
| 36 public views::ButtonListener, | 36 public views::ButtonListener, |
| 37 public views::LinkListener { | 37 public views::LinkListener { |
| 38 public: | 38 public: |
| 39 explicit ConfirmBubbleViews(const gfx::Point& anchor_point, | 39 ConfirmBubbleViews(gfx::NativeView parent, |
| 40 ConfirmBubbleModel* model); | 40 const gfx::Point& anchor_point, |
| 41 ConfirmBubbleModel* model); |
| 41 | 42 |
| 42 protected: | 43 protected: |
| 43 virtual ~ConfirmBubbleViews(); | 44 virtual ~ConfirmBubbleViews(); |
| 44 | 45 |
| 45 // views::ButtonListener implementation. | 46 // views::ButtonListener implementation. |
| 46 virtual void ButtonPressed(views::Button* sender, | 47 virtual void ButtonPressed(views::Button* sender, |
| 47 const ui::Event& event) OVERRIDE; | 48 const ui::Event& event) OVERRIDE; |
| 48 | 49 |
| 49 // views::LinkListener implementation. | 50 // views::LinkListener implementation. |
| 50 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; | 51 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; |
| 51 | 52 |
| 52 // views::BubbleDelegateView implementation. | 53 // views::BubbleDelegateView implementation. |
| 53 virtual gfx::Rect GetAnchorRect() OVERRIDE; | 54 virtual gfx::Rect GetAnchorRect() OVERRIDE; |
| 54 virtual void Init() OVERRIDE; | 55 virtual void Init() OVERRIDE; |
| 55 | 56 |
| 56 private: | 57 private: |
| 57 // The screen point where this bubble is anchored. | |
| 58 gfx::Point anchor_point_; | |
| 59 | |
| 60 // The model to customize this bubble view. | 58 // The model to customize this bubble view. |
| 61 scoped_ptr<ConfirmBubbleModel> model_; | 59 scoped_ptr<ConfirmBubbleModel> model_; |
| 62 | 60 |
| 63 DISALLOW_COPY_AND_ASSIGN(ConfirmBubbleViews); | 61 DISALLOW_COPY_AND_ASSIGN(ConfirmBubbleViews); |
| 64 }; | 62 }; |
| 65 | 63 |
| 66 #endif // CHROME_BROWSER_UI_VIEWS_CONFIRM_BUBBLE_VIEWS_H_ | 64 #endif // CHROME_BROWSER_UI_VIEWS_CONFIRM_BUBBLE_VIEWS_H_ |
| OLD | NEW |