| 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/shell_window_geometry_cache.h" | 7 #include "apps/shell_window_geometry_cache.h" |
| 8 #include "apps/shell_window_registry.h" | 8 #include "apps/shell_window_registry.h" |
| 9 #include "apps/ui/native_app_window.h" | 9 #include "apps/ui/native_app_window.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 } | 533 } |
| 534 | 534 |
| 535 void ShellWindow::CloseContents(WebContents* contents) { | 535 void ShellWindow::CloseContents(WebContents* contents) { |
| 536 native_app_window_->Close(); | 536 native_app_window_->Close(); |
| 537 } | 537 } |
| 538 | 538 |
| 539 bool ShellWindow::ShouldSuppressDialogs() { | 539 bool ShellWindow::ShouldSuppressDialogs() { |
| 540 return true; | 540 return true; |
| 541 } | 541 } |
| 542 | 542 |
| 543 content::ColorChooser* ShellWindow::OpenColorChooser(WebContents* web_contents, | 543 content::ColorChooser* ShellWindow::OpenColorChooser( |
| 544 SkColor initial_color) { | 544 WebContents* web_contents, |
| 545 SkColor initial_color, |
| 546 const std::vector<content::ColorSuggestion>& suggestionss) { |
| 545 return delegate_->ShowColorChooser(web_contents, initial_color); | 547 return delegate_->ShowColorChooser(web_contents, initial_color); |
| 546 } | 548 } |
| 547 | 549 |
| 548 void ShellWindow::RunFileChooser(WebContents* tab, | 550 void ShellWindow::RunFileChooser(WebContents* tab, |
| 549 const content::FileChooserParams& params) { | 551 const content::FileChooserParams& params) { |
| 550 if (window_type_is_panel()) { | 552 if (window_type_is_panel()) { |
| 551 // Panels can't host a file dialog, abort. TODO(stevenjb): allow file | 553 // Panels can't host a file dialog, abort. TODO(stevenjb): allow file |
| 552 // dialogs to be unhosted but still close with the owning web contents. | 554 // dialogs to be unhosted but still close with the owning web contents. |
| 553 // crbug.com/172502. | 555 // crbug.com/172502. |
| 554 LOG(WARNING) << "File dialog opened by panel."; | 556 LOG(WARNING) << "File dialog opened by panel."; |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 region.bounds.x(), | 757 region.bounds.x(), |
| 756 region.bounds.y(), | 758 region.bounds.y(), |
| 757 region.bounds.right(), | 759 region.bounds.right(), |
| 758 region.bounds.bottom(), | 760 region.bounds.bottom(), |
| 759 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 761 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
| 760 } | 762 } |
| 761 return sk_region; | 763 return sk_region; |
| 762 } | 764 } |
| 763 | 765 |
| 764 } // namespace apps | 766 } // namespace apps |
| OLD | NEW |