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

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

Issue 1672103002: Pass the frame instead of the WebContents through RunBluetoothChooser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@doc-bubble-lifetimes
Patch Set: Sync Created 4 years, 10 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 const base::CommandLine& command_line = 377 const base::CommandLine& command_line =
378 *base::CommandLine::ForCurrentProcess(); 378 *base::CommandLine::ForCurrentProcess();
379 dialog_manager_.reset(command_line.HasSwitch(switches::kRunLayoutTest) 379 dialog_manager_.reset(command_line.HasSwitch(switches::kRunLayoutTest)
380 ? new LayoutTestJavaScriptDialogManager 380 ? new LayoutTestJavaScriptDialogManager
381 : new ShellJavaScriptDialogManager); 381 : new ShellJavaScriptDialogManager);
382 } 382 }
383 return dialog_manager_.get(); 383 return dialog_manager_.get();
384 } 384 }
385 385
386 scoped_ptr<BluetoothChooser> Shell::RunBluetoothChooser( 386 scoped_ptr<BluetoothChooser> Shell::RunBluetoothChooser(
387 WebContents* web_contents, 387 RenderFrameHost* frame,
388 const BluetoothChooser::EventHandler& event_handler, 388 const BluetoothChooser::EventHandler& event_handler,
389 const url::Origin& origin) { 389 const url::Origin& origin) {
390 const base::CommandLine& command_line = 390 const base::CommandLine& command_line =
391 *base::CommandLine::ForCurrentProcess(); 391 *base::CommandLine::ForCurrentProcess();
392 if (command_line.HasSwitch(switches::kRunLayoutTest)) { 392 if (command_line.HasSwitch(switches::kRunLayoutTest)) {
393 return BlinkTestController::Get()->RunBluetoothChooser( 393 return BlinkTestController::Get()->RunBluetoothChooser(frame, event_handler,
394 web_contents, event_handler, origin); 394 origin);
395 } 395 }
396 return nullptr; 396 return nullptr;
397 } 397 }
398 398
399 bool Shell::AddMessageToConsole(WebContents* source, 399 bool Shell::AddMessageToConsole(WebContents* source,
400 int32_t level, 400 int32_t level,
401 const base::string16& message, 401 const base::string16& message,
402 int32_t line_no, 402 int32_t line_no,
403 const base::string16& source_id) { 403 const base::string16& source_id) {
404 return base::CommandLine::ForCurrentProcess()->HasSwitch( 404 return base::CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 devtools_frontend_->Activate(); 460 devtools_frontend_->Activate();
461 devtools_frontend_->Focus(); 461 devtools_frontend_->Focus();
462 } 462 }
463 463
464 void Shell::OnDevToolsWebContentsDestroyed() { 464 void Shell::OnDevToolsWebContentsDestroyed() {
465 devtools_observer_.reset(); 465 devtools_observer_.reset();
466 devtools_frontend_ = NULL; 466 devtools_frontend_ = NULL;
467 } 467 }
468 468
469 } // namespace content 469 } // namespace content
OLDNEW
« content/browser/bluetooth/bluetooth_dispatcher_host.cc ('K') | « content/shell/browser/shell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698