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