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

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

Issue 314113010: Remove deprecated permissions functions from Extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
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/extension_tab_util.h" 5 #include "chrome/browser/extensions/extension_tab_util.h"
6 6
7 #include "apps/app_window.h" 7 #include "apps/app_window.h"
8 #include "apps/app_window_registry.h" 8 #include "apps/app_window_registry.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" 10 #include "chrome/browser/extensions/api/tabs/tabs_constants.h"
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 395
396 if (!has_permission) { 396 if (!has_permission) {
397 tab_info->Remove(keys::kUrlKey, NULL); 397 tab_info->Remove(keys::kUrlKey, NULL);
398 tab_info->Remove(keys::kTitleKey, NULL); 398 tab_info->Remove(keys::kTitleKey, NULL);
399 tab_info->Remove(keys::kFaviconUrlKey, NULL); 399 tab_info->Remove(keys::kFaviconUrlKey, NULL);
400 } 400 }
401 } 401 }
402 402
403 void ExtensionTabUtil::ScrubTabForExtension(const Extension* extension, 403 void ExtensionTabUtil::ScrubTabForExtension(const Extension* extension,
404 api::tabs::Tab* tab) { 404 api::tabs::Tab* tab) {
405 bool has_permission = extension && extension->HasAPIPermission( 405 bool has_permission =
406 APIPermission::kTab); 406 extension &&
407 extension->permissions_data()->HasAPIPermission(APIPermission::kTab);
407 408
408 if (!has_permission) { 409 if (!has_permission) {
409 tab->url.reset(); 410 tab->url.reset();
410 tab->title.reset(); 411 tab->title.reset();
411 tab->fav_icon_url.reset(); 412 tab->fav_icon_url.reset();
412 } 413 }
413 } 414 }
414 415
415 bool ExtensionTabUtil::GetTabStripModel(const WebContents* web_contents, 416 bool ExtensionTabUtil::GetTabStripModel(const WebContents* web_contents,
416 TabStripModel** tab_strip_model, 417 TabStripModel** tab_strip_model,
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 content::PAGE_TRANSITION_LINK, 571 content::PAGE_TRANSITION_LINK,
571 false); 572 false);
572 browser->OpenURL(params); 573 browser->OpenURL(params);
573 browser->window()->Show(); 574 browser->window()->Show();
574 WebContents* web_contents = 575 WebContents* web_contents =
575 browser->tab_strip_model()->GetActiveWebContents(); 576 browser->tab_strip_model()->GetActiveWebContents();
576 web_contents->GetDelegate()->ActivateContents(web_contents); 577 web_contents->GetDelegate()->ActivateContents(web_contents);
577 } 578 }
578 579
579 } // namespace extensions 580 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_storage_monitor.cc ('k') | chrome/browser/extensions/permissions_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698