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

Side by Side Diff: chrome/browser/ui/extensions/shell_window.cc

Issue 10959045: Switch WebIntentPickerController to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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/ui/extensions/shell_window.h" 5 #include "chrome/browser/ui/extensions/shell_window.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_process_manager.h" 8 #include "chrome/browser/extensions/extension_process_manager.h"
9 #include "chrome/browser/extensions/extension_system.h" 9 #include "chrome/browser/extensions/extension_system.h"
10 #include "chrome/browser/extensions/shell_window_geometry_cache.h" 10 #include "chrome/browser/extensions/shell_window_geometry_cache.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 bool ShellWindow::ShouldSuppressDialogs() { 346 bool ShellWindow::ShouldSuppressDialogs() {
347 return true; 347 return true;
348 } 348 }
349 349
350 void ShellWindow::WebIntentDispatch( 350 void ShellWindow::WebIntentDispatch(
351 content::WebContents* web_contents, 351 content::WebContents* web_contents,
352 content::WebIntentsDispatcher* intents_dispatcher) { 352 content::WebIntentsDispatcher* intents_dispatcher) {
353 if (!web_intents::IsWebIntentsEnabledForProfile(profile_)) 353 if (!web_intents::IsWebIntentsEnabledForProfile(profile_))
354 return; 354 return;
355 355
356 contents_->web_intent_picker_controller()->SetIntentsDispatcher( 356 WebIntentPickerController* web_intent_picker_controller =
357 intents_dispatcher); 357 WebIntentPickerController::FromWebContents(contents_->web_contents());
358 contents_->web_intent_picker_controller()->ShowDialog( 358 web_intent_picker_controller->SetIntentsDispatcher(intents_dispatcher);
359 web_intent_picker_controller->ShowDialog(
359 intents_dispatcher->GetIntent().action, 360 intents_dispatcher->GetIntent().action,
360 intents_dispatcher->GetIntent().type); 361 intents_dispatcher->GetIntent().type);
361 } 362 }
362 363
363 void ShellWindow::RunFileChooser(WebContents* tab, 364 void ShellWindow::RunFileChooser(WebContents* tab,
364 const content::FileChooserParams& params) { 365 const content::FileChooserParams& params) {
365 FileSelectHelper::RunFileChooser(tab, params); 366 FileSelectHelper::RunFileChooser(tab, params);
366 } 367 }
367 368
368 bool ShellWindow::IsPopupOrPanel(const WebContents* source) const { 369 bool ShellWindow::IsPopupOrPanel(const WebContents* source) const {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 if (window_key_.empty()) 455 if (window_key_.empty())
455 return; 456 return;
456 457
457 extensions::ShellWindowGeometryCache* cache = 458 extensions::ShellWindowGeometryCache* cache =
458 extensions::ExtensionSystem::Get(profile())-> 459 extensions::ExtensionSystem::Get(profile())->
459 shell_window_geometry_cache(); 460 shell_window_geometry_cache();
460 461
461 gfx::Rect bounds = native_window_->GetBounds(); 462 gfx::Rect bounds = native_window_->GetBounds();
462 cache->SaveGeometry(extension()->id(), window_key_, bounds); 463 cache->SaveGeometry(extension()->id(), window_key_, bounds);
463 } 464 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698