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

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

Issue 369933002: Use the correct thread to access g_browser_process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 6 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SESSION_CRASHED_BUBBLE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" 9 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
10 #include "content/public/browser/notification_observer.h" 10 #include "content/public/browser/notification_observer.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 private: 44 private:
45 // A helper class that listens to browser removal event. 45 // A helper class that listens to browser removal event.
46 class BrowserRemovalObserver; 46 class BrowserRemovalObserver;
47 47
48 SessionCrashedBubbleView(views::View* anchor_view, 48 SessionCrashedBubbleView(views::View* anchor_view,
49 Browser* browser, 49 Browser* browser,
50 content::WebContents* web_contents, 50 content::WebContents* web_contents,
51 bool offer_uma_optin); 51 bool offer_uma_optin);
52 virtual ~SessionCrashedBubbleView(); 52 virtual ~SessionCrashedBubbleView();
53 53
54 // Creates and shows the session crashed bubble, with |offer_uma_optin| 54 // Creates and shows the session crashed bubble, with |uma_opted_in_already|
55 // indicating whether the UMA opt-in checkbox should be shown. Called 55 // indicating whether the user has already opted-in to UMA. It will called by
jwd 2014/07/07 19:57:24 "It will BE called by..."
yao 2014/07/07 20:24:48 Done.
56 // by Show after checking whether the UMA option should be presented and it 56 // Show after checking the user's current UMA preference. It takes ownership
57 // takes ownership of |browser_observer|. 57 // of |browser_observer|.
58 static void ShowForReal(scoped_ptr<BrowserRemovalObserver> browser_observer, 58 static void ShowForReal(scoped_ptr<BrowserRemovalObserver> browser_observer,
59 bool offer_uma_optin); 59 bool uma_opted_in_already);
60 60
61 // WidgetDelegateView methods. 61 // WidgetDelegateView methods.
62 virtual views::View* GetInitiallyFocusedView() OVERRIDE; 62 virtual views::View* GetInitiallyFocusedView() OVERRIDE;
63 virtual base::string16 GetWindowTitle() const OVERRIDE; 63 virtual base::string16 GetWindowTitle() const OVERRIDE;
64 virtual bool ShouldShowWindowTitle() const OVERRIDE; 64 virtual bool ShouldShowWindowTitle() const OVERRIDE;
65 virtual bool ShouldShowCloseButton() const OVERRIDE; 65 virtual bool ShouldShowCloseButton() const OVERRIDE;
66 66
67 // views::BubbleDelegateView methods. 67 // views::BubbleDelegateView methods.
68 virtual void Init() OVERRIDE; 68 virtual void Init() OVERRIDE;
69 69
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // Whether or not the UMA opt-in option should be shown. 127 // Whether or not the UMA opt-in option should be shown.
128 bool offer_uma_optin_; 128 bool offer_uma_optin_;
129 129
130 // Whether or not a navigation has started on current tab. 130 // Whether or not a navigation has started on current tab.
131 bool started_navigation_; 131 bool started_navigation_;
132 132
133 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView); 133 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView);
134 }; 134 };
135 135
136 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_ 136 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698