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

Side by Side Diff: chrome/browser/ui/views/website_settings/website_settings_popup_view.h

Issue 23441062: Fix a crash by asynchronizing destruction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/website_settings/website_settings_popup_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_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/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h"
11 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
12 #include "chrome/browser/ui/views/website_settings/permission_selector_view_obse rver.h" 13 #include "chrome/browser/ui/views/website_settings/permission_selector_view_obse rver.h"
13 #include "chrome/browser/ui/website_settings/website_settings_ui.h" 14 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
14 #include "ui/views/bubble/bubble_delegate.h" 15 #include "ui/views/bubble/bubble_delegate.h"
15 #include "ui/views/controls/button/button.h" 16 #include "ui/views/controls/button/button.h"
16 #include "ui/views/controls/link_listener.h" 17 #include "ui/views/controls/link_listener.h"
17 #include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h" 18 #include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h"
18 19
19 class Browser; 20 class Browser;
20 class GURL; 21 class GURL;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // are cleared and destroyed first. Then the |icon|, |headline|, |text| and 108 // are cleared and destroyed first. Then the |icon|, |headline|, |text| and
108 // |link| are layout out properly. If the |headline| is an empty string then 109 // |link| are layout out properly. If the |headline| is an empty string then
109 // no headline will be displayed. The ownership of the passed |link| is 110 // no headline will be displayed. The ownership of the passed |link| is
110 // transfered to the ResetConnectionSection method and the |link| is added to 111 // transfered to the ResetConnectionSection method and the |link| is added to
111 // the views hierarchy. If the |link| is NULL then no link is be displayed. 112 // the views hierarchy. If the |link| is NULL then no link is be displayed.
112 void ResetConnectionSection(views::View* section_container, 113 void ResetConnectionSection(views::View* section_container,
113 const gfx::Image& icon, 114 const gfx::Image& icon,
114 const string16& headline, 115 const string16& headline,
115 const string16& text, 116 const string16& text,
116 views::Link* link); 117 views::Link* link);
118 // Handles LinkClicked asynchronously.
119 void HandleLinkClickedAsync(views::Link* source);
117 120
118 // The web contents of the current tab. The popup can't live longer than a 121 // The web contents of the current tab. The popup can't live longer than a
119 // tab. 122 // tab.
120 content::WebContents* web_contents_; 123 content::WebContents* web_contents_;
121 124
122 // The Browser is used to load the help center page. 125 // The Browser is used to load the help center page.
123 Browser* browser_; 126 Browser* browser_;
124 127
125 // The presenter that controlls the Website Settings UI. 128 // The presenter that controlls the Website Settings UI.
126 scoped_ptr<WebsiteSettings> presenter_; 129 scoped_ptr<WebsiteSettings> presenter_;
(...skipping 25 matching lines...) Expand all
152 // provide a certificate then |cert_id_| is 0. 155 // provide a certificate then |cert_id_| is 0.
153 int cert_id_; 156 int cert_id_;
154 157
155 // The link to open the help center page that contains more information about 158 // The link to open the help center page that contains more information about
156 // the connection status icons. 159 // the connection status icons.
157 views::Link* help_center_link_; 160 views::Link* help_center_link_;
158 161
159 views::View* connection_info_content_; 162 views::View* connection_info_content_;
160 views::View* page_info_content_; 163 views::View* page_info_content_;
161 164
165 base::WeakPtrFactory<WebsiteSettingsPopupView> weak_factory_;
166
162 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView); 167 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupView);
163 }; 168 };
164 169
165 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_ H_ 170 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_WEBSITE_SETTINGS_POPUP_VIEW_ H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/website_settings/website_settings_popup_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698