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

Side by Side Diff: content/shell/browser/shell.cc

Issue 2089933002: Context Menu Refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing nits Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/shell/browser/shell.h" 5 #include "content/shell/browser/shell.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 434
435 void Shell::RendererUnresponsive(WebContents* source) { 435 void Shell::RendererUnresponsive(WebContents* source) {
436 if (switches::IsRunLayoutTestSwitchPresent()) 436 if (switches::IsRunLayoutTestSwitchPresent())
437 BlinkTestController::Get()->RendererUnresponsive(); 437 BlinkTestController::Get()->RendererUnresponsive();
438 } 438 }
439 439
440 void Shell::ActivateContents(WebContents* contents) { 440 void Shell::ActivateContents(WebContents* contents) {
441 contents->GetRenderViewHost()->GetWidget()->Focus(); 441 contents->GetRenderViewHost()->GetWidget()->Focus();
442 } 442 }
443 443
444 bool Shell::HandleContextMenu(const content::ContextMenuParams& params) { 444 bool Shell::HandleContextMenu(RenderFrameHost* render_frame_host,
445 const content::ContextMenuParams& params) {
445 return PlatformHandleContextMenu(params); 446 return PlatformHandleContextMenu(params);
446 } 447 }
447 448
448 gfx::Size Shell::GetShellDefaultSize() { 449 gfx::Size Shell::GetShellDefaultSize() {
449 static gfx::Size default_shell_size; 450 static gfx::Size default_shell_size;
450 if (!default_shell_size.IsEmpty()) 451 if (!default_shell_size.IsEmpty())
451 return default_shell_size; 452 return default_shell_size;
452 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 453 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
453 if (command_line->HasSwitch(switches::kContentShellHostWindowSize)) { 454 if (command_line->HasSwitch(switches::kContentShellHostWindowSize)) {
454 const std::string size_str = command_line->GetSwitchValueASCII( 455 const std::string size_str = command_line->GetSwitchValueASCII(
(...skipping 23 matching lines...) Expand all
478 devtools_frontend_->Activate(); 479 devtools_frontend_->Activate();
479 devtools_frontend_->Focus(); 480 devtools_frontend_->Focus();
480 } 481 }
481 482
482 void Shell::OnDevToolsWebContentsDestroyed() { 483 void Shell::OnDevToolsWebContentsDestroyed() {
483 devtools_observer_.reset(); 484 devtools_observer_.reset();
484 devtools_frontend_ = NULL; 485 devtools_frontend_ = NULL;
485 } 486 }
486 487
487 } // namespace content 488 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698