Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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), |
| 208 profile->GetPath()), | 208 profile->GetPath()), |
|
grt (UTC plus 2)
2012/06/15 19:24:07
does this fit on the line above now?
gab
2012/06/15 19:29:59
Yep, 80 chars right on, good eye :)!
| |
| 209 GetWidget()->GetTopLevelWidget()->GetNativeWindow()); | 209 GetWidget()->GetTopLevelWidget()->GetNativeWindow()); |
| 210 #endif | 210 #endif |
| 211 OnViewWasResized(); | 211 OnViewWasResized(); |
| 212 | 212 |
| 213 window_->Show(); | 213 window_->Show(); |
| 214 } | 214 } |
| 215 | 215 |
| 216 void ShellWindowViews::ViewHierarchyChanged( | 216 void ShellWindowViews::ViewHierarchyChanged( |
| 217 bool is_add, views::View *parent, views::View *child) { | 217 bool is_add, views::View *parent, views::View *child) { |
| 218 if (is_add && child == this) { | 218 if (is_add && child == this) { |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 446 window_->UpdateWindowTitle(); | 446 window_->UpdateWindowTitle(); |
| 447 } | 447 } |
| 448 | 448 |
| 449 // static | 449 // static |
| 450 ShellWindow* ShellWindow::CreateImpl(Profile* profile, | 450 ShellWindow* ShellWindow::CreateImpl(Profile* profile, |
| 451 const extensions::Extension* extension, | 451 const extensions::Extension* extension, |
| 452 const GURL& url, | 452 const GURL& url, |
| 453 const ShellWindow::CreateParams& params) { | 453 const ShellWindow::CreateParams& params) { |
| 454 return new ShellWindowViews(profile, extension, url, params); | 454 return new ShellWindowViews(profile, extension, url, params); |
| 455 } | 455 } |
| OLD | NEW |