OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/content_setting_bubble_contents.h" | 5 #include "chrome/browser/ui/views/content_setting_bubble_contents.h" |
6 | 6 |
7 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
8 #include <gdk/gdk.h> | 8 #include <gdk/gdk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 return gfx::GetCursor(GDK_HAND2); | 102 return gfx::GetCursor(GDK_HAND2); |
103 #endif | 103 #endif |
104 } | 104 } |
105 | 105 |
106 ContentSettingBubbleContents::ContentSettingBubbleContents( | 106 ContentSettingBubbleContents::ContentSettingBubbleContents( |
107 ContentSettingBubbleModel* content_setting_bubble_model, | 107 ContentSettingBubbleModel* content_setting_bubble_model, |
108 Profile* profile, | 108 Profile* profile, |
109 TabContents* tab_contents, | 109 TabContents* tab_contents, |
110 views::View* anchor_view, | 110 views::View* anchor_view, |
111 views::BubbleBorder::ArrowLocation arrow_location) | 111 views::BubbleBorder::ArrowLocation arrow_location) |
112 : BubbleDelegateView(anchor_view, arrow_location, SK_ColorWHITE), | 112 : BubbleDelegateView(anchor_view, arrow_location), |
113 content_setting_bubble_model_(content_setting_bubble_model), | 113 content_setting_bubble_model_(content_setting_bubble_model), |
114 profile_(profile), | 114 profile_(profile), |
115 tab_contents_(tab_contents), | 115 tab_contents_(tab_contents), |
116 custom_link_(NULL), | 116 custom_link_(NULL), |
117 manage_link_(NULL), | 117 manage_link_(NULL), |
118 close_button_(NULL) { | 118 close_button_(NULL) { |
119 registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED, | 119 registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED, |
120 content::Source<TabContents>(tab_contents)); | 120 content::Source<TabContents>(tab_contents)); |
121 } | 121 } |
122 | 122 |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 } | 329 } |
330 | 330 |
331 void ContentSettingBubbleContents::Observe( | 331 void ContentSettingBubbleContents::Observe( |
332 int type, | 332 int type, |
333 const content::NotificationSource& source, | 333 const content::NotificationSource& source, |
334 const content::NotificationDetails& details) { | 334 const content::NotificationDetails& details) { |
335 DCHECK(type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED); | 335 DCHECK(type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED); |
336 DCHECK(source == content::Source<TabContents>(tab_contents_)); | 336 DCHECK(source == content::Source<TabContents>(tab_contents_)); |
337 tab_contents_ = NULL; | 337 tab_contents_ = NULL; |
338 } | 338 } |
OLD | NEW |