OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/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 <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // defined(OS_WIN) | 10 #endif // defined(OS_WIN) |
(...skipping 2428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2439 !IsWebAppFrameEnabled()) { | 2439 !IsWebAppFrameEnabled()) { |
2440 return false; | 2440 return false; |
2441 } | 2441 } |
2442 | 2442 |
2443 // Use the web app frame for hosted apps. | 2443 // Use the web app frame for hosted apps. |
2444 const std::string extension_id = | 2444 const std::string extension_id = |
2445 web_app::GetExtensionIdFromApplicationName(app_name()); | 2445 web_app::GetExtensionIdFromApplicationName(app_name()); |
2446 const extensions::Extension* extension = | 2446 const extensions::Extension* extension = |
2447 extensions::ExtensionRegistry::Get(profile_)->GetExtensionById( | 2447 extensions::ExtensionRegistry::Get(profile_)->GetExtensionById( |
2448 extension_id, extensions::ExtensionRegistry::EVERYTHING); | 2448 extension_id, extensions::ExtensionRegistry::EVERYTHING); |
2449 return extension && extension->is_hosted_app(); | 2449 return extension && extension->from_bookmark(); |
2450 } | 2450 } |
2451 | 2451 |
2452 bool Browser::SupportsWindowFeatureImpl(WindowFeature feature, | 2452 bool Browser::SupportsWindowFeatureImpl(WindowFeature feature, |
2453 bool check_fullscreen) const { | 2453 bool check_fullscreen) const { |
2454 bool hide_ui_for_fullscreen = check_fullscreen && ShouldHideUIForFullscreen(); | 2454 bool hide_ui_for_fullscreen = check_fullscreen && ShouldHideUIForFullscreen(); |
2455 | 2455 |
2456 unsigned int features = FEATURE_INFOBAR | FEATURE_DOWNLOADSHELF; | 2456 unsigned int features = FEATURE_INFOBAR | FEATURE_DOWNLOADSHELF; |
2457 | 2457 |
2458 if (is_type_tabbed()) | 2458 if (is_type_tabbed()) |
2459 features |= FEATURE_BOOKMARKBAR; | 2459 features |= FEATURE_BOOKMARKBAR; |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2620 if (contents && !allow_js_access) { | 2620 if (contents && !allow_js_access) { |
2621 contents->web_contents()->GetController().LoadURL( | 2621 contents->web_contents()->GetController().LoadURL( |
2622 target_url, | 2622 target_url, |
2623 content::Referrer(), | 2623 content::Referrer(), |
2624 ui::PAGE_TRANSITION_LINK, | 2624 ui::PAGE_TRANSITION_LINK, |
2625 std::string()); // No extra headers. | 2625 std::string()); // No extra headers. |
2626 } | 2626 } |
2627 | 2627 |
2628 return contents != NULL; | 2628 return contents != NULL; |
2629 } | 2629 } |
OLD | NEW |