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

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: scoped_ptr should be passed. 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/session_crashed_bubble_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 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 be called
56 // by Show after checking whether the UMA option should be presented and it 56 // by Show. It takes ownership of |browser_observer|.
57 // takes ownership of |browser_observer|.
58 static void ShowForReal(scoped_ptr<BrowserRemovalObserver> browser_observer, 57 static void ShowForReal(scoped_ptr<BrowserRemovalObserver> browser_observer,
59 bool offer_uma_optin); 58 bool uma_opted_in_already);
60 59
61 // WidgetDelegateView methods. 60 // WidgetDelegateView methods.
62 virtual views::View* GetInitiallyFocusedView() OVERRIDE; 61 virtual views::View* GetInitiallyFocusedView() OVERRIDE;
63 virtual base::string16 GetWindowTitle() const OVERRIDE; 62 virtual base::string16 GetWindowTitle() const OVERRIDE;
64 virtual bool ShouldShowWindowTitle() const OVERRIDE; 63 virtual bool ShouldShowWindowTitle() const OVERRIDE;
65 virtual bool ShouldShowCloseButton() const OVERRIDE; 64 virtual bool ShouldShowCloseButton() const OVERRIDE;
66 65
67 // views::BubbleDelegateView methods. 66 // views::BubbleDelegateView methods.
68 virtual void Init() OVERRIDE; 67 virtual void Init() OVERRIDE;
69 68
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // Whether or not the UMA opt-in option should be shown. 126 // Whether or not the UMA opt-in option should be shown.
128 bool offer_uma_optin_; 127 bool offer_uma_optin_;
129 128
130 // Whether or not a navigation has started on current tab. 129 // Whether or not a navigation has started on current tab.
131 bool started_navigation_; 130 bool started_navigation_;
132 131
133 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView); 132 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView);
134 }; 133 };
135 134
136 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_ 135 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/session_crashed_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698