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

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs_api.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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/tabs_test.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 (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/api/tabs/tabs_api.h" 5 #include "chrome/browser/extensions/api/tabs/tabs_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 Browser* browser = *it; 848 Browser* browser = *it;
849 if (!GetProfile()->IsSameProfile(browser->profile())) 849 if (!GetProfile()->IsSameProfile(browser->profile()))
850 continue; 850 continue;
851 851
852 if (!browser->window()) 852 if (!browser->window())
853 continue; 853 continue;
854 854
855 if (!include_incognito() && GetProfile() != browser->profile()) 855 if (!include_incognito() && GetProfile() != browser->profile())
856 continue; 856 continue;
857 857
858 if (!browser->extension_window_controller()->IsVisibleToExtension(
dgozman 2014/11/24 16:26:45 I had to add a check here for "tabs.query" to igno
not at google - send to devlin 2014/11/24 16:46:40 This check looks right to me. Do you mean a side-e
dgozman 2014/11/24 16:50:39 Yes, it's checked a few times, for example in Wind
859 extension())) {
860 continue;
861 }
862
858 if (window_id >= 0 && window_id != ExtensionTabUtil::GetWindowId(browser)) 863 if (window_id >= 0 && window_id != ExtensionTabUtil::GetWindowId(browser))
859 continue; 864 continue;
860 865
861 if (window_id == extension_misc::kCurrentWindowId && 866 if (window_id == extension_misc::kCurrentWindowId &&
862 browser != current_browser) { 867 browser != current_browser) {
863 continue; 868 continue;
864 } 869 }
865 870
866 if (!MatchesBool(params->query_info.current_window.get(), 871 if (!MatchesBool(params->query_info.current_window.get(),
867 browser == current_browser)) { 872 browser == current_browser)) {
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
1941 ZoomController::ZoomMode zoom_mode = zoom_controller->zoom_mode(); 1946 ZoomController::ZoomMode zoom_mode = zoom_controller->zoom_mode();
1942 api::tabs::ZoomSettings zoom_settings; 1947 api::tabs::ZoomSettings zoom_settings;
1943 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); 1948 ZoomModeToZoomSettings(zoom_mode, &zoom_settings);
1944 1949
1945 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); 1950 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings);
1946 SendResponse(true); 1951 SendResponse(true);
1947 return true; 1952 return true;
1948 } 1953 }
1949 1954
1950 } // namespace extensions 1955 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/tabs_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698