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/extensions/extension_uninstall_dialog_view.cc

Issue 8479042: UI polish for certificate viewer (Closed) Base URL: /usr/local/google/home/bshe/NoTouchChromium/../TouchChromium/src/@trunk
Patch Set: Edit comments. Created 9 years, 1 month 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 (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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/extensions/extension_uninstall_dialog.h" 9 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/browser_list.h" 11 #include "chrome/browser/ui/browser_list.h"
12 #include "chrome/browser/ui/browser_window.h" 12 #include "chrome/browser/ui/browser_window.h"
13 #include "chrome/browser/ui/dialog_style.h"
13 #include "chrome/browser/ui/views/window.h" 14 #include "chrome/browser/ui/views/window.h"
14 #include "chrome/common/extensions/extension.h" 15 #include "chrome/common/extensions/extension.h"
15 #include "grit/generated_resources.h" 16 #include "grit/generated_resources.h"
16 #include "ui/base/l10n/l10n_util.h" 17 #include "ui/base/l10n/l10n_util.h"
17 #include "ui/gfx/compositor/compositor.h" 18 #include "ui/gfx/compositor/compositor.h"
18 #include "ui/gfx/compositor/layer.h" 19 #include "ui/gfx/compositor/layer.h"
19 #include "ui/views/layout/layout_constants.h" 20 #include "ui/views/layout/layout_constants.h"
20 #include "ui/views/window/dialog_delegate.h" 21 #include "ui/views/window/dialog_delegate.h"
21 #include "views/controls/image_view.h" 22 #include "views/controls/image_view.h"
22 #include "views/controls/label.h" 23 #include "views/controls/label.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 return; 111 return;
111 } 112 }
112 113
113 BrowserWindow* window = browser->window(); 114 BrowserWindow* window = browser->window();
114 if (!window) { 115 if (!window) {
115 delegate_->ExtensionUninstallCanceled(); 116 delegate_->ExtensionUninstallCanceled();
116 return; 117 return;
117 } 118 }
118 119
119 view_ = new ExtensionUninstallDialogDelegateView(this, extension_, &icon_); 120 view_ = new ExtensionUninstallDialogDelegateView(this, extension_, &icon_);
120 browser::CreateViewsWindow(window->GetNativeHandle(), view_)->Show(); 121 browser::CreateViewsWindow(window->GetNativeHandle(),
122 view_,
123 STYLE_GENERIC)->Show();
121 } 124 }
122 125
123 void ExtensionUninstallDialogViews::ExtensionUninstallAccepted() { 126 void ExtensionUninstallDialogViews::ExtensionUninstallAccepted() {
124 // The widget gets destroyed when the dialog is accepted. 127 // The widget gets destroyed when the dialog is accepted.
125 view_ = NULL; 128 view_ = NULL;
126 delegate_->ExtensionUninstallAccepted(); 129 delegate_->ExtensionUninstallAccepted();
127 } 130 }
128 131
129 void ExtensionUninstallDialogViews::ExtensionUninstallCanceled() { 132 void ExtensionUninstallDialogViews::ExtensionUninstallCanceled() {
130 // The widget gets destroyed when the dialog is canceled. 133 // The widget gets destroyed when the dialog is canceled.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 227 }
225 } 228 }
226 229
227 } // namespace 230 } // namespace
228 231
229 // static 232 // static
230 ExtensionUninstallDialog* ExtensionUninstallDialog::Create( 233 ExtensionUninstallDialog* ExtensionUninstallDialog::Create(
231 Profile* profile, Delegate* delegate) { 234 Profile* profile, Delegate* delegate) {
232 return new ExtensionUninstallDialogViews(profile, delegate); 235 return new ExtensionUninstallDialogViews(profile, delegate);
233 } 236 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_install_dialog_view.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698