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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 } | 465 } |
466 | 466 |
467 void ShellWindow::CloseContents(WebContents* contents) { | 467 void ShellWindow::CloseContents(WebContents* contents) { |
468 native_app_window_->Close(); | 468 native_app_window_->Close(); |
469 } | 469 } |
470 | 470 |
471 bool ShellWindow::ShouldSuppressDialogs() { | 471 bool ShellWindow::ShouldSuppressDialogs() { |
472 return true; | 472 return true; |
473 } | 473 } |
474 | 474 |
475 content::ColorChooser* ShellWindow::OpenColorChooser(WebContents* web_contents, | 475 content::ColorChooser* ShellWindow::OpenColorChooser( |
476 SkColor initial_color) { | 476 WebContents* web_contents, |
| 477 SkColor initial_color, |
| 478 const std::vector<SkColor>& suggestions, |
| 479 const std::vector<string16>& suggestion_labels) { |
477 return delegate_->ShowColorChooser(web_contents, initial_color); | 480 return delegate_->ShowColorChooser(web_contents, initial_color); |
478 } | 481 } |
479 | 482 |
480 void ShellWindow::RunFileChooser(WebContents* tab, | 483 void ShellWindow::RunFileChooser(WebContents* tab, |
481 const content::FileChooserParams& params) { | 484 const content::FileChooserParams& params) { |
482 if (window_type_is_panel()) { | 485 if (window_type_is_panel()) { |
483 // Panels can't host a file dialog, abort. TODO(stevenjb): allow file | 486 // Panels can't host a file dialog, abort. TODO(stevenjb): allow file |
484 // dialogs to be unhosted but still close with the owning web contents. | 487 // dialogs to be unhosted but still close with the owning web contents. |
485 // crbug.com/172502. | 488 // crbug.com/172502. |
486 LOG(WARNING) << "File dialog opened by panel."; | 489 LOG(WARNING) << "File dialog opened by panel."; |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 region.bounds.x(), | 657 region.bounds.x(), |
655 region.bounds.y(), | 658 region.bounds.y(), |
656 region.bounds.right(), | 659 region.bounds.right(), |
657 region.bounds.bottom(), | 660 region.bounds.bottom(), |
658 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 661 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
659 } | 662 } |
660 return sk_region; | 663 return sk_region; |
661 } | 664 } |
662 | 665 |
663 } // namespace apps | 666 } // namespace apps |
OLD | NEW |