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

Side by Side Diff: chrome/browser/extensions/browser_extension_window_controller.cc

Issue 734983003: Make undocked DevTools window invisible to extensions API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tabs.query Created 6 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/extensions/browser_extension_window_controller.h" 5 #include "chrome/browser/extensions/browser_extension_window_controller.h"
6 6
7 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" 7 #include "chrome/browser/extensions/api/tabs/tabs_constants.h"
8 #include "chrome/browser/extensions/extension_tab_util.h" 8 #include "chrome/browser/extensions/extension_tab_util.h"
9 #include "chrome/browser/extensions/window_controller_list.h" 9 #include "chrome/browser/extensions/window_controller_list.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 browser_->ToggleFullscreenModeWithExtension(extension_url); 82 browser_->ToggleFullscreenModeWithExtension(extension_url);
83 } 83 }
84 84
85 Browser* BrowserExtensionWindowController::GetBrowser() const { 85 Browser* BrowserExtensionWindowController::GetBrowser() const {
86 return browser_; 86 return browser_;
87 } 87 }
88 88
89 bool BrowserExtensionWindowController::IsVisibleToExtension( 89 bool BrowserExtensionWindowController::IsVisibleToExtension(
90 const extensions::Extension* extension) const { 90 const extensions::Extension* extension) const {
91 // Platform apps can only see their own windows. 91 // Platform apps can only see their own windows.
92 return !extension->is_platform_app(); 92 return !browser_->is_devtools() && !extension->is_platform_app();
93 } 93 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698