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

Side by Side Diff: chrome/browser/first_run/try_chrome_dialog_view.h

Issue 6840003: first-run: Refactor Upgrade class into a common upgrade_util API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: upgrade_utils -> upgrade_util Created 9 years, 8 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 | « chrome/browser/browser_shutdown.cc ('k') | chrome/browser/first_run/try_chrome_dialog_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) 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 #ifndef CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_ 5 #ifndef CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_
6 #define CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_ 6 #define CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "chrome/browser/first_run/upgrade.h" 11 #include "chrome/browser/first_run/upgrade_util.h"
12 #include "views/controls/button/button.h" 12 #include "views/controls/button/button.h"
13 #include "views/controls/link.h" 13 #include "views/controls/link.h"
14 #include "ui/gfx/native_widget_types.h" 14 #include "ui/gfx/native_widget_types.h"
15 15
16 class ProcessSingleton; 16 class ProcessSingleton;
17 17
18 namespace gfx { 18 namespace gfx {
19 class Rect; 19 class Rect;
20 } 20 }
21 21
(...skipping 18 matching lines...) Expand all
40 // 40 //
41 class TryChromeDialogView : public views::ButtonListener, 41 class TryChromeDialogView : public views::ButtonListener,
42 public views::LinkController { 42 public views::LinkController {
43 public: 43 public:
44 explicit TryChromeDialogView(size_t version); 44 explicit TryChromeDialogView(size_t version);
45 virtual ~TryChromeDialogView(); 45 virtual ~TryChromeDialogView();
46 46
47 // Shows the modal dialog asking the user to try chrome. Note that the dialog 47 // Shows the modal dialog asking the user to try chrome. Note that the dialog
48 // has no parent and it will position itself in a lower corner of the screen. 48 // has no parent and it will position itself in a lower corner of the screen.
49 // The dialog does not steal focus and does not have an entry in the taskbar. 49 // The dialog does not steal focus and does not have an entry in the taskbar.
50 Upgrade::TryResult ShowModal(ProcessSingleton* process_singleton); 50 upgrade_util::TryResult ShowModal(ProcessSingleton* process_singleton);
51 51
52 protected: 52 protected:
53 // views::ButtonListener: 53 // views::ButtonListener:
54 // We have two buttons and according to what the user clicked we set |result_| 54 // We have two buttons and according to what the user clicked we set |result_|
55 // and we should always close and end the modal loop. 55 // and we should always close and end the modal loop.
56 virtual void ButtonPressed(views::Button* sender, 56 virtual void ButtonPressed(views::Button* sender,
57 const views::Event& event) OVERRIDE; 57 const views::Event& event) OVERRIDE;
58 58
59 // views::LinkController: 59 // views::LinkController:
60 // If the user selects the link we need to fire off the default browser that 60 // If the user selects the link we need to fire off the default browser that
(...skipping 19 matching lines...) Expand all
80 void SetToastRegion(gfx::NativeWindow window, int w, int h); 80 void SetToastRegion(gfx::NativeWindow window, int w, int h);
81 81
82 // Controls which version of the text to use. 82 // Controls which version of the text to use.
83 size_t version_; 83 size_t version_;
84 84
85 // We don't own any of these pointers. The |popup_| owns itself and owns the 85 // We don't own any of these pointers. The |popup_| owns itself and owns the
86 // other views. 86 // other views.
87 views::Widget* popup_; 87 views::Widget* popup_;
88 views::RadioButton* try_chrome_; 88 views::RadioButton* try_chrome_;
89 views::RadioButton* kill_chrome_; 89 views::RadioButton* kill_chrome_;
90 Upgrade::TryResult result_; 90 upgrade_util::TryResult result_;
91 91
92 DISALLOW_COPY_AND_ASSIGN(TryChromeDialogView); 92 DISALLOW_COPY_AND_ASSIGN(TryChromeDialogView);
93 }; 93 };
94 94
95 #endif // CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_ 95 #endif // CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser_shutdown.cc ('k') | chrome/browser/first_run/try_chrome_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698