| OLD | NEW |
| 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 "chrome/browser/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> |
| 8 #include <shellapi.h> | 9 #include <shellapi.h> |
| 9 #include <windows.h> | |
| 10 #endif // OS_WIN | 10 #endif // OS_WIN |
| 11 | 11 |
| 12 #include <algorithm> | 12 #include <algorithm> |
| 13 #include <string> | 13 #include <string> |
| 14 | 14 |
| 15 #include "base/base_paths.h" | 15 #include "base/base_paths.h" |
| 16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
| 17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/metrics/histogram.h" | 18 #include "base/metrics/histogram.h" |
| 19 #include "base/path_service.h" | 19 #include "base/path_service.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 #include "net/base/net_util.h" | 129 #include "net/base/net_util.h" |
| 130 #include "net/base/registry_controlled_domain.h" | 130 #include "net/base/registry_controlled_domain.h" |
| 131 #include "net/url_request/url_request_context.h" | 131 #include "net/url_request/url_request_context.h" |
| 132 #include "ui/base/animation/animation.h" | 132 #include "ui/base/animation/animation.h" |
| 133 #include "ui/base/l10n/l10n_util.h" | 133 #include "ui/base/l10n/l10n_util.h" |
| 134 #include "ui/gfx/point.h" | 134 #include "ui/gfx/point.h" |
| 135 #include "webkit/glue/webkit_glue.h" | 135 #include "webkit/glue/webkit_glue.h" |
| 136 #include "webkit/glue/window_open_disposition.h" | 136 #include "webkit/glue/window_open_disposition.h" |
| 137 | 137 |
| 138 #if defined(OS_WIN) | 138 #if defined(OS_WIN) |
| 139 #include "app/win/shell.h" | |
| 140 #include "chrome/browser/autofill/autofill_ie_toolbar_import_win.h" | 139 #include "chrome/browser/autofill/autofill_ie_toolbar_import_win.h" |
| 141 #include "chrome/browser/shell_integration.h" | 140 #include "chrome/browser/shell_integration.h" |
| 142 #include "chrome/browser/ssl/ssl_error_info.h" | 141 #include "chrome/browser/ssl/ssl_error_info.h" |
| 143 #include "chrome/browser/task_manager/task_manager.h" | 142 #include "chrome/browser/task_manager/task_manager.h" |
| 144 #include "chrome/browser/ui/view_ids.h" | 143 #include "chrome/browser/ui/view_ids.h" |
| 145 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 144 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 145 #include "ui/base/win/shell.h" |
| 146 #endif // OS_WIN | 146 #endif // OS_WIN |
| 147 | 147 |
| 148 #if defined(OS_MACOSX) | 148 #if defined(OS_MACOSX) |
| 149 #include "content/browser/find_pasteboard.h" | 149 #include "content/browser/find_pasteboard.h" |
| 150 #endif | 150 #endif |
| 151 | 151 |
| 152 #if defined(OS_CHROMEOS) | 152 #if defined(OS_CHROMEOS) |
| 153 #include "chrome/browser/chromeos/boot_times_loader.h" | 153 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 154 #include "chrome/browser/extensions/file_manager_util.h" | 154 #include "chrome/browser/extensions/file_manager_util.h" |
| 155 #endif | 155 #endif |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 window_ = CreateBrowserWindow(); | 424 window_ = CreateBrowserWindow(); |
| 425 | 425 |
| 426 #if defined(OS_WIN) | 426 #if defined(OS_WIN) |
| 427 { | 427 { |
| 428 // TODO: This might hit the disk | 428 // TODO: This might hit the disk |
| 429 // http://code.google.com/p/chromium/issues/detail?id=61638 | 429 // http://code.google.com/p/chromium/issues/detail?id=61638 |
| 430 base::ThreadRestrictions::ScopedAllowIO allow_io; | 430 base::ThreadRestrictions::ScopedAllowIO allow_io; |
| 431 | 431 |
| 432 // Set the app user model id for this application to that of the application | 432 // Set the app user model id for this application to that of the application |
| 433 // name. See http://crbug.com/7028. | 433 // name. See http://crbug.com/7028. |
| 434 app::win::SetAppIdForWindow( | 434 ui::win::SetAppIdForWindow( |
| 435 is_app() ? | 435 is_app() ? |
| 436 ShellIntegration::GetAppId(UTF8ToWide(app_name_), profile_->GetPath()) : | 436 ShellIntegration::GetAppId(UTF8ToWide(app_name_), profile_->GetPath()) : |
| 437 ShellIntegration::GetChromiumAppId(profile_->GetPath()), | 437 ShellIntegration::GetChromiumAppId(profile_->GetPath()), |
| 438 window()->GetNativeHandle()); | 438 window()->GetNativeHandle()); |
| 439 } | 439 } |
| 440 #endif | 440 #endif |
| 441 | 441 |
| 442 NotificationService::current()->Notify( | 442 NotificationService::current()->Notify( |
| 443 NotificationType::BROWSER_WINDOW_READY, | 443 NotificationType::BROWSER_WINDOW_READY, |
| 444 Source<Browser>(this), | 444 Source<Browser>(this), |
| (...skipping 4250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4695 TabContents* current_tab = GetSelectedTabContents(); | 4695 TabContents* current_tab = GetSelectedTabContents(); |
| 4696 if (current_tab) { | 4696 if (current_tab) { |
| 4697 content_restrictions = current_tab->content_restrictions(); | 4697 content_restrictions = current_tab->content_restrictions(); |
| 4698 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); | 4698 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); |
| 4699 // See comment in UpdateCommandsForTabState about why we call url(). | 4699 // See comment in UpdateCommandsForTabState about why we call url(). |
| 4700 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) | 4700 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) |
| 4701 content_restrictions |= CONTENT_RESTRICTION_SAVE; | 4701 content_restrictions |= CONTENT_RESTRICTION_SAVE; |
| 4702 } | 4702 } |
| 4703 return content_restrictions; | 4703 return content_restrictions; |
| 4704 } | 4704 } |
| OLD | NEW |