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

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

Issue 2561983002: NavigationController: Reload methods migration (Closed)
Patch Set: one more mac build fix Created 4 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 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 "chrome/browser/extensions/extension_action_runner.h" 5 #include "chrome/browser/extensions/extension_action_runner.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 return; 376 return;
377 { 377 {
378 // Ignore the active tab permission being granted because we don't want 378 // Ignore the active tab permission being granted because we don't want
379 // to run scripts right before we refresh the page. 379 // to run scripts right before we refresh the page.
380 base::AutoReset<bool> ignore_active_tab(&ignore_active_tab_granted_, 380 base::AutoReset<bool> ignore_active_tab(&ignore_active_tab_granted_,
381 true); 381 true);
382 TabHelper::FromWebContents(web_contents()) 382 TabHelper::FromWebContents(web_contents())
383 ->active_tab_permission_granter() 383 ->active_tab_permission_granter()
384 ->GrantIfRequested(extension); 384 ->GrantIfRequested(extension);
385 } 385 }
386 web_contents()->GetController().Reload(false); 386 web_contents()->GetController().Reload(content::ReloadType::NORMAL, false);
Takashi Toyoshima 2016/12/15 06:21:51 Probably, there is no case for POST here because w
387 } 387 }
388 } 388 }
389 389
390 bool ExtensionActionRunner::OnMessageReceived( 390 bool ExtensionActionRunner::OnMessageReceived(
391 const IPC::Message& message, 391 const IPC::Message& message,
392 content::RenderFrameHost* render_frame_host) { 392 content::RenderFrameHost* render_frame_host) {
393 bool handled = true; 393 bool handled = true;
394 IPC_BEGIN_MESSAGE_MAP(ExtensionActionRunner, message) 394 IPC_BEGIN_MESSAGE_MAP(ExtensionActionRunner, message)
395 IPC_MESSAGE_HANDLER(ExtensionHostMsg_RequestScriptInjectionPermission, 395 IPC_MESSAGE_HANDLER(ExtensionHostMsg_RequestScriptInjectionPermission,
396 OnRequestScriptInjectionPermission) 396 OnRequestScriptInjectionPermission)
(...skipping 23 matching lines...) Expand all
420 UnloadedExtensionInfo::Reason reason) { 420 UnloadedExtensionInfo::Reason reason) {
421 PendingScriptMap::iterator iter = pending_scripts_.find(extension->id()); 421 PendingScriptMap::iterator iter = pending_scripts_.find(extension->id());
422 if (iter != pending_scripts_.end()) { 422 if (iter != pending_scripts_.end()) {
423 pending_scripts_.erase(iter); 423 pending_scripts_.erase(iter);
424 ExtensionActionAPI::Get(browser_context_) 424 ExtensionActionAPI::Get(browser_context_)
425 ->NotifyPageActionsChanged(web_contents()); 425 ->NotifyPageActionsChanged(web_contents());
426 } 426 }
427 } 427 }
428 428
429 } // namespace extensions 429 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698