Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Side by Side Diff: apps/app_window.cc

Issue 204703002: Rename NOTIFICATION_EXTENSION_UNLOADED to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: maybe upload wont do something bizarre this time Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « apps/app_load_service.cc ('k') | apps/app_window_geometry_cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 8
9 #include "apps/app_window_geometry_cache.h" 9 #include "apps/app_window_geometry_cache.h"
10 #include "apps/app_window_registry.h" 10 #include "apps/app_window_registry.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 290
291 OnNativeWindowChanged(); 291 OnNativeWindowChanged();
292 292
293 // When the render view host is changed, the native window needs to know 293 // When the render view host is changed, the native window needs to know
294 // about it in case it has any setup to do to make the renderer appear 294 // about it in case it has any setup to do to make the renderer appear
295 // properly. In particular, on Windows, the view's clickthrough region needs 295 // properly. In particular, on Windows, the view's clickthrough region needs
296 // to be set. 296 // to be set.
297 extensions::ExtensionsBrowserClient* client = 297 extensions::ExtensionsBrowserClient* client =
298 extensions::ExtensionsBrowserClient::Get(); 298 extensions::ExtensionsBrowserClient::Get();
299 registrar_.Add(this, 299 registrar_.Add(this,
300 chrome::NOTIFICATION_EXTENSION_UNLOADED, 300 chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
301 content::Source<content::BrowserContext>( 301 content::Source<content::BrowserContext>(
302 client->GetOriginalContext(browser_context_))); 302 client->GetOriginalContext(browser_context_)));
303 // Close when the browser process is exiting. 303 // Close when the browser process is exiting.
304 registrar_.Add(this, 304 registrar_.Add(this,
305 chrome::NOTIFICATION_APP_TERMINATING, 305 chrome::NOTIFICATION_APP_TERMINATING,
306 content::NotificationService::AllSources()); 306 content::NotificationService::AllSources());
307 // Update the app menu if an ephemeral app becomes installed. 307 // Update the app menu if an ephemeral app becomes installed.
308 registrar_.Add(this, 308 registrar_.Add(this,
309 chrome::NOTIFICATION_EXTENSION_INSTALLED, 309 chrome::NOTIFICATION_EXTENSION_INSTALLED,
310 content::Source<content::BrowserContext>( 310 content::Source<content::BrowserContext>(
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 903
904 bool AppWindow::IsFullscreenForTabOrPending(const content::WebContents* source) 904 bool AppWindow::IsFullscreenForTabOrPending(const content::WebContents* source)
905 const { 905 const {
906 return ((fullscreen_types_ & FULLSCREEN_TYPE_HTML_API) != 0); 906 return ((fullscreen_types_ & FULLSCREEN_TYPE_HTML_API) != 0);
907 } 907 }
908 908
909 void AppWindow::Observe(int type, 909 void AppWindow::Observe(int type,
910 const content::NotificationSource& source, 910 const content::NotificationSource& source,
911 const content::NotificationDetails& details) { 911 const content::NotificationDetails& details) {
912 switch (type) { 912 switch (type) {
913 case chrome::NOTIFICATION_EXTENSION_UNLOADED: { 913 case chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED: {
914 const extensions::Extension* unloaded_extension = 914 const extensions::Extension* unloaded_extension =
915 content::Details<extensions::UnloadedExtensionInfo>(details) 915 content::Details<extensions::UnloadedExtensionInfo>(details)
916 ->extension; 916 ->extension;
917 if (extension_ == unloaded_extension) 917 if (extension_ == unloaded_extension)
918 native_app_window_->Close(); 918 native_app_window_->Close();
919 break; 919 break;
920 } 920 }
921 case chrome::NOTIFICATION_EXTENSION_INSTALLED: { 921 case chrome::NOTIFICATION_EXTENSION_INSTALLED: {
922 const extensions::Extension* installed_extension = 922 const extensions::Extension* installed_extension =
923 content::Details<const extensions::InstalledExtensionInfo>(details) 923 content::Details<const extensions::InstalledExtensionInfo>(details)
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 region.bounds.x(), 1067 region.bounds.x(),
1068 region.bounds.y(), 1068 region.bounds.y(),
1069 region.bounds.right(), 1069 region.bounds.right(),
1070 region.bounds.bottom(), 1070 region.bounds.bottom(),
1071 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 1071 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
1072 } 1072 }
1073 return sk_region; 1073 return sk_region;
1074 } 1074 }
1075 1075
1076 } // namespace apps 1076 } // namespace apps
OLDNEW
« no previous file with comments | « apps/app_load_service.cc ('k') | apps/app_window_geometry_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698