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

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

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase Created 3 years, 7 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
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/tab_helper.h" 5 #include "chrome/browser/extensions/tab_helper.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 install_id, 607 install_id,
608 success, 608 success,
609 success ? std::string() : error, 609 success ? std::string() : error,
610 result)); 610 result));
611 } 611 }
612 612
613 WebContents* TabHelper::GetAssociatedWebContents() const { 613 WebContents* TabHelper::GetAssociatedWebContents() const {
614 return web_contents(); 614 return web_contents();
615 } 615 }
616 616
617 void TabHelper::OnExtensionUnloaded( 617 void TabHelper::OnExtensionUnloaded(content::BrowserContext* browser_context,
618 content::BrowserContext* browser_context, 618 const Extension* extension,
619 const Extension* extension, 619 UnloadedExtensionReason reason) {
620 UnloadedExtensionInfo::Reason reason) {
621 DCHECK(extension_app_); 620 DCHECK(extension_app_);
622 if (extension == extension_app_) 621 if (extension == extension_app_)
623 SetExtensionApp(nullptr); 622 SetExtensionApp(nullptr);
624 } 623 }
625 624
626 void TabHelper::GetApplicationInfo(WebAppAction action) { 625 void TabHelper::GetApplicationInfo(WebAppAction action) {
627 NavigationEntry* entry = 626 NavigationEntry* entry =
628 web_contents()->GetController().GetLastCommittedEntry(); 627 web_contents()->GetController().GetLastCommittedEntry();
629 if (!entry) 628 if (!entry)
630 return; 629 return;
(...skipping 23 matching lines...) Expand all
654 } 653 }
655 } 654 }
656 655
657 void TabHelper::SetTabId(content::RenderFrameHost* render_frame_host) { 656 void TabHelper::SetTabId(content::RenderFrameHost* render_frame_host) {
658 render_frame_host->Send( 657 render_frame_host->Send(
659 new ExtensionMsg_SetTabId(render_frame_host->GetRoutingID(), 658 new ExtensionMsg_SetTabId(render_frame_host->GetRoutingID(),
660 SessionTabHelper::IdForTab(web_contents()))); 659 SessionTabHelper::IdForTab(web_contents())));
661 } 660 }
662 661
663 } // namespace extensions 662 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/tab_helper.h ('k') | chrome/browser/extensions/tab_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698