| 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 |
| 11 #include "apps/app_delegate.h" | 11 #include "apps/app_delegate.h" |
| 12 #include "apps/app_web_contents_helper.h" | 12 #include "apps/app_web_contents_helper.h" |
| 13 #include "apps/app_window_geometry_cache.h" | 13 #include "apps/app_window_geometry_cache.h" |
| 14 #include "apps/app_window_registry.h" | 14 #include "apps/app_window_registry.h" |
| 15 #include "apps/ui/apps_client.h" | 15 #include "apps/ui/apps_client.h" |
| 16 #include "apps/ui/native_app_window.h" | |
| 17 #include "apps/ui/web_contents_sizer.h" | 16 #include "apps/ui/web_contents_sizer.h" |
| 18 #include "base/command_line.h" | 17 #include "base/command_line.h" |
| 19 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
| 20 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
| 21 #include "base/values.h" | 20 #include "base/values.h" |
| 22 #include "chrome/browser/chrome_notification_types.h" | 21 #include "chrome/browser/chrome_notification_types.h" |
| 23 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" | 22 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" |
| 24 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 23 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 25 #include "content/public/browser/browser_context.h" | 24 #include "content/public/browser/browser_context.h" |
| 26 #include "content/public/browser/invalidate_type.h" | 25 #include "content/public/browser/invalidate_type.h" |
| 27 #include "content/public/browser/navigation_entry.h" | 26 #include "content/public/browser/navigation_entry.h" |
| 28 #include "content/public/browser/notification_details.h" | 27 #include "content/public/browser/notification_details.h" |
| 29 #include "content/public/browser/notification_service.h" | 28 #include "content/public/browser/notification_service.h" |
| 30 #include "content/public/browser/notification_source.h" | 29 #include "content/public/browser/notification_source.h" |
| 31 #include "content/public/browser/notification_types.h" | 30 #include "content/public/browser/notification_types.h" |
| 32 #include "content/public/browser/render_view_host.h" | 31 #include "content/public/browser/render_view_host.h" |
| 33 #include "content/public/browser/resource_dispatcher_host.h" | 32 #include "content/public/browser/resource_dispatcher_host.h" |
| 34 #include "content/public/browser/web_contents.h" | 33 #include "content/public/browser/web_contents.h" |
| 35 #include "content/public/common/content_switches.h" | 34 #include "content/public/common/content_switches.h" |
| 36 #include "content/public/common/media_stream_request.h" | 35 #include "content/public/common/media_stream_request.h" |
| 36 #include "extensions/browser/app_window/native_app_window.h" |
| 37 #include "extensions/browser/app_window/size_constraints.h" | 37 #include "extensions/browser/app_window/size_constraints.h" |
| 38 #include "extensions/browser/extension_registry.h" | 38 #include "extensions/browser/extension_registry.h" |
| 39 #include "extensions/browser/extension_system.h" | 39 #include "extensions/browser/extension_system.h" |
| 40 #include "extensions/browser/extensions_browser_client.h" | 40 #include "extensions/browser/extensions_browser_client.h" |
| 41 #include "extensions/browser/notification_types.h" | 41 #include "extensions/browser/notification_types.h" |
| 42 #include "extensions/browser/process_manager.h" | 42 #include "extensions/browser/process_manager.h" |
| 43 #include "extensions/browser/suggest_permission_util.h" | 43 #include "extensions/browser/suggest_permission_util.h" |
| 44 #include "extensions/browser/view_type_utils.h" | 44 #include "extensions/browser/view_type_utils.h" |
| 45 #include "extensions/common/draggable_region.h" | 45 #include "extensions/common/draggable_region.h" |
| 46 #include "extensions/common/extension.h" | 46 #include "extensions/common/extension.h" |
| 47 #include "extensions/common/manifest_handlers/icons_handler.h" | 47 #include "extensions/common/manifest_handlers/icons_handler.h" |
| 48 #include "extensions/common/permissions/permissions_data.h" | 48 #include "extensions/common/permissions/permissions_data.h" |
| 49 #include "extensions/common/switches.h" | 49 #include "extensions/common/switches.h" |
| 50 #include "grit/theme_resources.h" | 50 #include "grit/theme_resources.h" |
| 51 #include "third_party/skia/include/core/SkRegion.h" | 51 #include "third_party/skia/include/core/SkRegion.h" |
| 52 #include "ui/base/resource/resource_bundle.h" | 52 #include "ui/base/resource/resource_bundle.h" |
| 53 #include "ui/gfx/screen.h" | 53 #include "ui/gfx/screen.h" |
| 54 | 54 |
| 55 #if !defined(OS_MACOSX) | 55 #if !defined(OS_MACOSX) |
| 56 #include "apps/pref_names.h" | 56 #include "apps/pref_names.h" |
| 57 #include "base/prefs/pref_service.h" | 57 #include "base/prefs/pref_service.h" |
| 58 #endif | 58 #endif |
| 59 | 59 |
| 60 using content::BrowserContext; | 60 using content::BrowserContext; |
| 61 using content::ConsoleMessageLevel; | 61 using content::ConsoleMessageLevel; |
| 62 using content::WebContents; | 62 using content::WebContents; |
| 63 using extensions::APIPermission; | 63 using extensions::APIPermission; |
| 64 using extensions::NativeAppWindow; |
| 64 using web_modal::WebContentsModalDialogHost; | 65 using web_modal::WebContentsModalDialogHost; |
| 65 using web_modal::WebContentsModalDialogManager; | 66 using web_modal::WebContentsModalDialogManager; |
| 66 | 67 |
| 67 namespace apps { | 68 namespace apps { |
| 68 | 69 |
| 69 namespace { | 70 namespace { |
| 70 | 71 |
| 71 const int kDefaultWidth = 512; | 72 const int kDefaultWidth = 512; |
| 72 const int kDefaultHeight = 384; | 73 const int kDefaultHeight = 384; |
| 73 | 74 |
| (...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1104 region.bounds.x(), | 1105 region.bounds.x(), |
| 1105 region.bounds.y(), | 1106 region.bounds.y(), |
| 1106 region.bounds.right(), | 1107 region.bounds.right(), |
| 1107 region.bounds.bottom(), | 1108 region.bounds.bottom(), |
| 1108 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 1109 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
| 1109 } | 1110 } |
| 1110 return sk_region; | 1111 return sk_region; |
| 1111 } | 1112 } |
| 1112 | 1113 |
| 1113 } // namespace apps | 1114 } // namespace apps |
| OLD | NEW |