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

Side by Side Diff: chrome/browser/ui/views/extensions/shell_window_views.cc

Issue 10542031: Suffix Chrome's appid on user-level installs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased on hkcu again... Created 8 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/views/extensions/shell_window_views.h" 5 #include "chrome/browser/ui/views/extensions/shell_window_views.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_host.h" 8 #include "chrome/browser/extensions/extension_host.h"
9 #include "chrome/common/extensions/extension.h" 9 #include "chrome/common/extensions/extension.h"
10 #include "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 params.bounds = win_params.bounds; 197 params.bounds = win_params.bounds;
198 minimum_size_ = win_params.minimum_size; 198 minimum_size_ = win_params.minimum_size;
199 maximum_size_ = win_params.maximum_size; 199 maximum_size_ = win_params.maximum_size;
200 if (!use_custom_frame_) 200 if (!use_custom_frame_)
201 params.bounds.set_height(params.bounds.height() + kCaptionHeight); 201 params.bounds.set_height(params.bounds.height() + kCaptionHeight);
202 window_->Init(params); 202 window_->Init(params);
203 #if defined(OS_WIN) && !defined(USE_AURA) 203 #if defined(OS_WIN) && !defined(USE_AURA)
204 std::string app_name = web_app::GenerateApplicationNameFromExtensionId( 204 std::string app_name = web_app::GenerateApplicationNameFromExtensionId(
205 extension->id()); 205 extension->id());
206 ui::win::SetAppIdForWindow( 206 ui::win::SetAppIdForWindow(
207 ShellIntegration::GetAppId(UTF8ToWide(app_name), 207 ShellIntegration::GetAppModelId(UTF8ToWide(app_name), profile->GetPath()),
208 profile->GetPath()),
209 GetWidget()->GetTopLevelWidget()->GetNativeWindow()); 208 GetWidget()->GetTopLevelWidget()->GetNativeWindow());
210 #endif 209 #endif
211 OnViewWasResized(); 210 OnViewWasResized();
212 211
213 window_->Show(); 212 window_->Show();
214 } 213 }
215 214
216 void ShellWindowViews::ViewHierarchyChanged( 215 void ShellWindowViews::ViewHierarchyChanged(
217 bool is_add, views::View *parent, views::View *child) { 216 bool is_add, views::View *parent, views::View *child) {
218 if (is_add && child == this) { 217 if (is_add && child == this) {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 window_->UpdateWindowTitle(); 445 window_->UpdateWindowTitle();
447 } 446 }
448 447
449 // static 448 // static
450 ShellWindow* ShellWindow::CreateImpl(Profile* profile, 449 ShellWindow* ShellWindow::CreateImpl(Profile* profile,
451 const extensions::Extension* extension, 450 const extensions::Extension* extension,
452 const GURL& url, 451 const GURL& url,
453 const ShellWindow::CreateParams& params) { 452 const ShellWindow::CreateParams& params) {
454 return new ShellWindowViews(profile, extension, url, params); 453 return new ShellWindowViews(profile, extension, url, params);
455 } 454 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698