| 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/native_app_window_views.h" | 5 #include "chrome/browser/ui/views/extensions/native_app_window_views.h" |
| 6 | 6 |
| 7 #include "chrome/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
| 8 #include "chrome/browser/extensions/extension_host.h" | 8 #include "chrome/browser/extensions/extension_host.h" |
| 9 #include "chrome/browser/favicon/favicon_tab_helper.h" | 9 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 iter != accelerator_table.end(); ++iter) { | 135 iter != accelerator_table.end(); ++iter) { |
| 136 focus_manager->RegisterAccelerator( | 136 focus_manager->RegisterAccelerator( |
| 137 iter->first, ui::AcceleratorManager::kNormalPriority, this); | 137 iter->first, ui::AcceleratorManager::kNormalPriority, this); |
| 138 } | 138 } |
| 139 | 139 |
| 140 #if defined(OS_WIN) && !defined(USE_AURA) | 140 #if defined(OS_WIN) && !defined(USE_AURA) |
| 141 std::string app_name = web_app::GenerateApplicationNameFromExtensionId( | 141 std::string app_name = web_app::GenerateApplicationNameFromExtensionId( |
| 142 extension()->id()); | 142 extension()->id()); |
| 143 ui::win::SetAppIdForWindow( | 143 ui::win::SetAppIdForWindow( |
| 144 ShellIntegration::GetAppModelIdForProfile( | 144 ShellIntegration::GetAppModelIdForProfile( |
| 145 UTF8ToWide(app_name), shell_window_->profile()->GetPath()), | 145 base::UTF8ToWide(app_name), shell_window_->profile()->GetPath()), |
| 146 GetWidget()->GetTopLevelWidget()->GetNativeWindow()); | 146 GetWidget()->GetTopLevelWidget()->GetNativeWindow()); |
| 147 #endif | 147 #endif |
| 148 } | 148 } |
| 149 | 149 |
| 150 void NativeAppWindowViews::InitializePanelWindow( | 150 void NativeAppWindowViews::InitializePanelWindow( |
| 151 const ShellWindow::CreateParams& create_params) { | 151 const ShellWindow::CreateParams& create_params) { |
| 152 views::Widget::InitParams params(views::Widget::InitParams::TYPE_PANEL); | 152 views::Widget::InitParams params(views::Widget::InitParams::TYPE_PANEL); |
| 153 params.delegate = this; | 153 params.delegate = this; |
| 154 | 154 |
| 155 preferred_size_ = gfx::Size(create_params.bounds.width(), | 155 preferred_size_ = gfx::Size(create_params.bounds.width(), |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 } | 585 } |
| 586 | 586 |
| 587 //------------------------------------------------------------------------------ | 587 //------------------------------------------------------------------------------ |
| 588 // NativeAppWindow::Create | 588 // NativeAppWindow::Create |
| 589 | 589 |
| 590 // static | 590 // static |
| 591 NativeAppWindow* NativeAppWindow::Create( | 591 NativeAppWindow* NativeAppWindow::Create( |
| 592 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { | 592 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { |
| 593 return new NativeAppWindowViews(shell_window, params); | 593 return new NativeAppWindowViews(shell_window, params); |
| 594 } | 594 } |
| OLD | NEW |