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

Side by Side Diff: chrome/browser/ui/app_list/search/app_result.cc

Issue 276833002: Make the App Info Dialog appear modal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary mac fixes Created 6 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/app_list/search/app_result.h" 5 #include "chrome/browser/ui/app_list/search/app_result.h"
6 6
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/extension_util.h" 8 #include "chrome/browser/extensions/extension_util.h"
9 #include "chrome/browser/extensions/install_tracker.h" 9 #include "chrome/browser/extensions/install_tracker.h"
10 #include "chrome/browser/extensions/install_tracker_factory.h" 10 #include "chrome/browser/extensions/install_tracker_factory.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 install_tracker_->RemoveObserver(this); 132 install_tracker_->RemoveObserver(this);
133 133
134 install_tracker_ = NULL; 134 install_tracker_ = NULL;
135 } 135 }
136 136
137 bool AppResult::RunExtensionEnableFlow() { 137 bool AppResult::RunExtensionEnableFlow() {
138 if (extensions::util::IsAppLaunchableWithoutEnabling(app_id_, profile_)) 138 if (extensions::util::IsAppLaunchableWithoutEnabling(app_id_, profile_))
139 return false; 139 return false;
140 140
141 if (!extension_enable_flow_) { 141 if (!extension_enable_flow_) {
142 controller_->OnShowExtensionPrompt(); 142 controller_->OnShowChildDialog();
143 143
144 extension_enable_flow_.reset(new ExtensionEnableFlow( 144 extension_enable_flow_.reset(new ExtensionEnableFlow(
145 profile_, app_id_, this)); 145 profile_, app_id_, this));
146 extension_enable_flow_->StartForNativeWindow( 146 extension_enable_flow_->StartForNativeWindow(
147 controller_->GetAppListWindow()); 147 controller_->GetAppListWindow());
148 } 148 }
149 return true; 149 return true;
150 } 150 }
151 151
152 void AppResult::UpdateIcon() { 152 void AppResult::UpdateIcon() {
(...skipping 11 matching lines...) Expand all
164 DCHECK_EQ(icon_.get(), image); 164 DCHECK_EQ(icon_.get(), image);
165 UpdateIcon(); 165 UpdateIcon();
166 } 166 }
167 167
168 void AppResult::ExecuteLaunchCommand(int event_flags) { 168 void AppResult::ExecuteLaunchCommand(int event_flags) {
169 Open(event_flags); 169 Open(event_flags);
170 } 170 }
171 171
172 void AppResult::ExtensionEnableFlowFinished() { 172 void AppResult::ExtensionEnableFlowFinished() {
173 extension_enable_flow_.reset(); 173 extension_enable_flow_.reset();
174 controller_->OnCloseExtensionPrompt(); 174 controller_->OnCloseChildDialog();
175 175
176 // Automatically open app after enabling. 176 // Automatically open app after enabling.
177 Open(ui::EF_NONE); 177 Open(ui::EF_NONE);
178 } 178 }
179 179
180 void AppResult::ExtensionEnableFlowAborted(bool user_initiated) { 180 void AppResult::ExtensionEnableFlowAborted(bool user_initiated) {
181 extension_enable_flow_.reset(); 181 extension_enable_flow_.reset();
182 controller_->OnCloseExtensionPrompt(); 182 controller_->OnCloseChildDialog();
183 } 183 }
184 184
185 void AppResult::OnExtensionLoaded(const extensions::Extension* extension) { 185 void AppResult::OnExtensionLoaded(const extensions::Extension* extension) {
186 UpdateIcon(); 186 UpdateIcon();
187 } 187 }
188 188
189 void AppResult::OnExtensionUninstalled(const extensions::Extension* extension) { 189 void AppResult::OnExtensionUninstalled(const extensions::Extension* extension) {
190 if (extension->id() != app_id_) 190 if (extension->id() != app_id_)
191 return; 191 return;
192 192
193 NotifyItemUninstalled(); 193 NotifyItemUninstalled();
194 } 194 }
195 195
196 void AppResult::OnShutdown() { StopObservingInstall(); } 196 void AppResult::OnShutdown() { StopObservingInstall(); }
197 197
198 } // namespace app_list 198 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/extension_uninstaller.cc ('k') | chrome/browser/ui/apps/app_info_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698