| 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 "extensions/browser/app_window/app_window.h" | 5 #include "extensions/browser/app_window/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 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 } | 925 } |
| 926 | 926 |
| 927 void AppWindow::NavigationStateChanged(content::WebContents* source, | 927 void AppWindow::NavigationStateChanged(content::WebContents* source, |
| 928 content::InvalidateTypes changed_flags) { | 928 content::InvalidateTypes changed_flags) { |
| 929 if (changed_flags & content::INVALIDATE_TYPE_TITLE) | 929 if (changed_flags & content::INVALIDATE_TYPE_TITLE) |
| 930 native_app_window_->UpdateWindowTitle(); | 930 native_app_window_->UpdateWindowTitle(); |
| 931 else if (changed_flags & content::INVALIDATE_TYPE_TAB) | 931 else if (changed_flags & content::INVALIDATE_TYPE_TAB) |
| 932 native_app_window_->UpdateWindowIcon(); | 932 native_app_window_->UpdateWindowIcon(); |
| 933 } | 933 } |
| 934 | 934 |
| 935 void AppWindow::EnterFullscreenModeForTab(content::WebContents* source, |
| 936 const GURL& origin) { |
| 937 ToggleFullscreenModeForTab(source, true); |
| 938 } |
| 939 |
| 940 void AppWindow::ExitFullscreenModeForTab(content::WebContents* source) { |
| 941 ToggleFullscreenModeForTab(source, false); |
| 942 } |
| 943 |
| 935 void AppWindow::ToggleFullscreenModeForTab(content::WebContents* source, | 944 void AppWindow::ToggleFullscreenModeForTab(content::WebContents* source, |
| 936 bool enter_fullscreen) { | 945 bool enter_fullscreen) { |
| 937 const Extension* extension = GetExtension(); | 946 const Extension* extension = GetExtension(); |
| 938 if (!extension) | 947 if (!extension) |
| 939 return; | 948 return; |
| 940 | 949 |
| 941 if (!IsExtensionWithPermissionOrSuggestInConsole( | 950 if (!IsExtensionWithPermissionOrSuggestInConsole( |
| 942 APIPermission::kFullscreen, extension, source->GetRenderViewHost())) { | 951 APIPermission::kFullscreen, extension, source->GetRenderViewHost())) { |
| 943 return; | 952 return; |
| 944 } | 953 } |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1098 region.bounds.x(), | 1107 region.bounds.x(), |
| 1099 region.bounds.y(), | 1108 region.bounds.y(), |
| 1100 region.bounds.right(), | 1109 region.bounds.right(), |
| 1101 region.bounds.bottom(), | 1110 region.bounds.bottom(), |
| 1102 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 1111 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
| 1103 } | 1112 } |
| 1104 return sk_region; | 1113 return sk_region; |
| 1105 } | 1114 } |
| 1106 | 1115 |
| 1107 } // namespace extensions | 1116 } // namespace extensions |
| OLD | NEW |