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

Side by Side Diff: extensions/browser/app_window/app_window.cc

Issue 691823002: Add WebContents source to methods in WebContentsDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/app_window/app_window.h" 5 #include "extensions/browser/app_window/app_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 879
880 if (CommandLine::ForCurrentProcess()->HasSwitch(::switches::kTestType)) { 880 if (CommandLine::ForCurrentProcess()->HasSwitch(::switches::kTestType)) {
881 app_window_contents_->DispatchWindowShownForTests(); 881 app_window_contents_->DispatchWindowShownForTests();
882 } 882 }
883 } 883 }
884 884
885 void AppWindow::CloseContents(WebContents* contents) { 885 void AppWindow::CloseContents(WebContents* contents) {
886 native_app_window_->Close(); 886 native_app_window_->Close();
887 } 887 }
888 888
889 bool AppWindow::ShouldSuppressDialogs() { return true; } 889 bool AppWindow::ShouldSuppressDialogs(WebContents* source) {
890 return true;
891 }
890 892
891 content::ColorChooser* AppWindow::OpenColorChooser( 893 content::ColorChooser* AppWindow::OpenColorChooser(
892 WebContents* web_contents, 894 WebContents* web_contents,
893 SkColor initial_color, 895 SkColor initial_color,
894 const std::vector<content::ColorSuggestion>& suggestions) { 896 const std::vector<content::ColorSuggestion>& suggestions) {
895 return app_delegate_->ShowColorChooser(web_contents, initial_color); 897 return app_delegate_->ShowColorChooser(web_contents, initial_color);
896 } 898 }
897 899
898 void AppWindow::RunFileChooser(WebContents* tab, 900 void AppWindow::RunFileChooser(WebContents* tab,
899 const content::FileChooserParams& params) { 901 const content::FileChooserParams& params) {
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 region.bounds.x(), 1090 region.bounds.x(),
1089 region.bounds.y(), 1091 region.bounds.y(),
1090 region.bounds.right(), 1092 region.bounds.right(),
1091 region.bounds.bottom(), 1093 region.bounds.bottom(),
1092 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 1094 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
1093 } 1095 }
1094 return sk_region; 1096 return sk_region;
1095 } 1097 }
1096 1098
1097 } // namespace extensions 1099 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698