| OLD | NEW |
| 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 "apps/shell_window.h" | 5 #include "apps/shell_window.h" |
| 6 | 6 |
| 7 #include "apps/native_app_window.h" | 7 #include "apps/native_app_window.h" |
| 8 #include "apps/shell_window_geometry_cache.h" | 8 #include "apps/shell_window_geometry_cache.h" |
| 9 #include "apps/shell_window_registry.h" | 9 #include "apps/shell_window_registry.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 } | 456 } |
| 457 | 457 |
| 458 void ShellWindow::CloseContents(WebContents* contents) { | 458 void ShellWindow::CloseContents(WebContents* contents) { |
| 459 native_app_window_->Close(); | 459 native_app_window_->Close(); |
| 460 } | 460 } |
| 461 | 461 |
| 462 bool ShellWindow::ShouldSuppressDialogs() { | 462 bool ShellWindow::ShouldSuppressDialogs() { |
| 463 return true; | 463 return true; |
| 464 } | 464 } |
| 465 | 465 |
| 466 content::ColorChooser* ShellWindow::OpenColorChooser(WebContents* web_contents, | 466 content::ColorChooser* ShellWindow::OpenColorChooser( |
| 467 SkColor initial_color) { | 467 WebContents* web_contents, |
| 468 SkColor initial_color, |
| 469 const std::vector<SkColor>& suggestions, |
| 470 const std::vector<string16>& suggestion_labels) { |
| 468 return delegate_->ShowColorChooser(web_contents, initial_color); | 471 return delegate_->ShowColorChooser(web_contents, initial_color); |
| 469 } | 472 } |
| 470 | 473 |
| 471 void ShellWindow::RunFileChooser(WebContents* tab, | 474 void ShellWindow::RunFileChooser(WebContents* tab, |
| 472 const content::FileChooserParams& params) { | 475 const content::FileChooserParams& params) { |
| 473 if (window_type_is_panel()) { | 476 if (window_type_is_panel()) { |
| 474 // Panels can't host a file dialog, abort. TODO(stevenjb): allow file | 477 // Panels can't host a file dialog, abort. TODO(stevenjb): allow file |
| 475 // dialogs to be unhosted but still close with the owning web contents. | 478 // dialogs to be unhosted but still close with the owning web contents. |
| 476 // crbug.com/172502. | 479 // crbug.com/172502. |
| 477 LOG(WARNING) << "File dialog opened by panel."; | 480 LOG(WARNING) << "File dialog opened by panel."; |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 region.bounds.x(), | 648 region.bounds.x(), |
| 646 region.bounds.y(), | 649 region.bounds.y(), |
| 647 region.bounds.right(), | 650 region.bounds.right(), |
| 648 region.bounds.bottom(), | 651 region.bounds.bottom(), |
| 649 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 652 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
| 650 } | 653 } |
| 651 return sk_region; | 654 return sk_region; |
| 652 } | 655 } |
| 653 | 656 |
| 654 } // namespace apps | 657 } // namespace apps |
| OLD | NEW |