| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "chrome/browser/ui/views/validation_message_bubble_delegate.h" | 5 #include "chrome/browser/ui/views/validation_message_bubble_delegate.h" |
| 6 | 6 |
| 7 #include "grit/theme_resources.h" | 7 #include "grit/theme_resources.h" |
| 8 #include "ui/base/resource/resource_bundle.h" | 8 #include "ui/base/resource/resource_bundle.h" |
| 9 #include "ui/views/controls/image_view.h" | 9 #include "ui/views/controls/image_view.h" |
| 10 #include "ui/views/controls/label.h" | 10 #include "ui/views/controls/label.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 void ValidationMessageBubbleDelegate::Close() { | 82 void ValidationMessageBubbleDelegate::Close() { |
| 83 GetWidget()->Close(); | 83 GetWidget()->Close(); |
| 84 observer_ = NULL; | 84 observer_ = NULL; |
| 85 } | 85 } |
| 86 | 86 |
| 87 void ValidationMessageBubbleDelegate::SetPositionRelativeToAnchor( | 87 void ValidationMessageBubbleDelegate::SetPositionRelativeToAnchor( |
| 88 const gfx::Rect& anchor_in_screen) { | 88 const gfx::Rect& anchor_in_screen) { |
| 89 SetAnchorRect(anchor_in_screen); | 89 SetAnchorRect(anchor_in_screen); |
| 90 } | 90 } |
| 91 | 91 |
| 92 gfx::Size ValidationMessageBubbleDelegate::GetPreferredSize() { | 92 gfx::Size ValidationMessageBubbleDelegate::GetPreferredSize() const { |
| 93 return gfx::Size(width_, height_); | 93 return gfx::Size(width_, height_); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void ValidationMessageBubbleDelegate::DeleteDelegate() { | 96 void ValidationMessageBubbleDelegate::DeleteDelegate() { |
| 97 delete this; | 97 delete this; |
| 98 } | 98 } |
| 99 | 99 |
| 100 void ValidationMessageBubbleDelegate::WindowClosing() { | 100 void ValidationMessageBubbleDelegate::WindowClosing() { |
| 101 if (observer_ != NULL) | 101 if (observer_ != NULL) |
| 102 observer_->WindowClosing(); | 102 observer_->WindowClosing(); |
| 103 } | 103 } |
| OLD | NEW |