OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "apps/app_window.h" | 5 #include "apps/app_window.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "extensions/browser/view_type_utils.h" | 42 #include "extensions/browser/view_type_utils.h" |
43 #include "extensions/common/draggable_region.h" | 43 #include "extensions/common/draggable_region.h" |
44 #include "extensions/common/extension.h" | 44 #include "extensions/common/extension.h" |
45 #include "extensions/common/manifest_handlers/icons_handler.h" | 45 #include "extensions/common/manifest_handlers/icons_handler.h" |
46 #include "extensions/common/permissions/permissions_data.h" | 46 #include "extensions/common/permissions/permissions_data.h" |
47 #include "extensions/common/switches.h" | 47 #include "extensions/common/switches.h" |
48 #include "third_party/skia/include/core/SkRegion.h" | 48 #include "third_party/skia/include/core/SkRegion.h" |
49 #include "ui/gfx/screen.h" | 49 #include "ui/gfx/screen.h" |
50 | 50 |
51 #if !defined(OS_MACOSX) | 51 #if !defined(OS_MACOSX) |
| 52 #include "apps/pref_names.h" |
52 #include "base/prefs/pref_service.h" | 53 #include "base/prefs/pref_service.h" |
53 #include "extensions/browser/pref_names.h" | |
54 #endif | 54 #endif |
55 | 55 |
56 using content::BrowserContext; | 56 using content::BrowserContext; |
57 using content::ConsoleMessageLevel; | 57 using content::ConsoleMessageLevel; |
58 using content::WebContents; | 58 using content::WebContents; |
59 using extensions::APIPermission; | 59 using extensions::APIPermission; |
60 using extensions::NativeAppWindow; | 60 using extensions::NativeAppWindow; |
61 using web_modal::WebContentsModalDialogHost; | 61 using web_modal::WebContentsModalDialogHost; |
62 using web_modal::WebContentsModalDialogManager; | 62 using web_modal::WebContentsModalDialogManager; |
63 | 63 |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 | 586 |
587 if (enable) { | 587 if (enable) { |
588 #if !defined(OS_MACOSX) | 588 #if !defined(OS_MACOSX) |
589 // Do not enter fullscreen mode if disallowed by pref. | 589 // Do not enter fullscreen mode if disallowed by pref. |
590 // TODO(bartfab): Add a test once it becomes possible to simulate a user | 590 // TODO(bartfab): Add a test once it becomes possible to simulate a user |
591 // gesture. http://crbug.com/174178 | 591 // gesture. http://crbug.com/174178 |
592 if (type != FULLSCREEN_TYPE_FORCED) { | 592 if (type != FULLSCREEN_TYPE_FORCED) { |
593 PrefService* prefs = | 593 PrefService* prefs = |
594 extensions::ExtensionsBrowserClient::Get()->GetPrefServiceForContext( | 594 extensions::ExtensionsBrowserClient::Get()->GetPrefServiceForContext( |
595 browser_context()); | 595 browser_context()); |
596 if (!prefs->GetBoolean(extensions::pref_names::kAppFullscreenAllowed)) | 596 if (!prefs->GetBoolean(prefs::kAppFullscreenAllowed)) |
597 return; | 597 return; |
598 } | 598 } |
599 #endif | 599 #endif |
600 fullscreen_types_ |= type; | 600 fullscreen_types_ |= type; |
601 } else { | 601 } else { |
602 fullscreen_types_ &= ~type; | 602 fullscreen_types_ &= ~type; |
603 } | 603 } |
604 SetNativeWindowFullscreen(); | 604 SetNativeWindowFullscreen(); |
605 } | 605 } |
606 | 606 |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1091 region.bounds.x(), | 1091 region.bounds.x(), |
1092 region.bounds.y(), | 1092 region.bounds.y(), |
1093 region.bounds.right(), | 1093 region.bounds.right(), |
1094 region.bounds.bottom(), | 1094 region.bounds.bottom(), |
1095 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 1095 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
1096 } | 1096 } |
1097 return sk_region; | 1097 return sk_region; |
1098 } | 1098 } |
1099 | 1099 |
1100 } // namespace apps | 1100 } // namespace apps |
OLD | NEW |