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

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

Issue 2059533002: Change WebContentsDelegate::RunFileChooser to be frame based. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes based on reviews. Created 4 years, 6 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 return true; 920 return true;
921 } 921 }
922 922
923 content::ColorChooser* AppWindow::OpenColorChooser( 923 content::ColorChooser* AppWindow::OpenColorChooser(
924 WebContents* web_contents, 924 WebContents* web_contents,
925 SkColor initial_color, 925 SkColor initial_color,
926 const std::vector<content::ColorSuggestion>& suggestions) { 926 const std::vector<content::ColorSuggestion>& suggestions) {
927 return app_delegate_->ShowColorChooser(web_contents, initial_color); 927 return app_delegate_->ShowColorChooser(web_contents, initial_color);
928 } 928 }
929 929
930 void AppWindow::RunFileChooser(WebContents* tab, 930 void AppWindow::RunFileChooser(content::RenderFrameHost* render_frame_host,
931 const content::FileChooserParams& params) { 931 const content::FileChooserParams& params) {
932 if (window_type_is_panel()) { 932 if (window_type_is_panel()) {
933 // Panels can't host a file dialog, abort. TODO(stevenjb): allow file 933 // Panels can't host a file dialog, abort. TODO(stevenjb): allow file
934 // dialogs to be unhosted but still close with the owning web contents. 934 // dialogs to be unhosted but still close with the owning web contents.
935 // crbug.com/172502. 935 // crbug.com/172502.
936 LOG(WARNING) << "File dialog opened by panel."; 936 LOG(WARNING) << "File dialog opened by panel.";
937 return; 937 return;
938 } 938 }
939 939
940 app_delegate_->RunFileChooser(tab, params); 940 app_delegate_->RunFileChooser(render_frame_host, params);
941 } 941 }
942 942
943 bool AppWindow::IsPopupOrPanel(const WebContents* source) const { return true; } 943 bool AppWindow::IsPopupOrPanel(const WebContents* source) const { return true; }
944 944
945 void AppWindow::MoveContents(WebContents* source, const gfx::Rect& pos) { 945 void AppWindow::MoveContents(WebContents* source, const gfx::Rect& pos) {
946 native_app_window_->SetBounds(pos); 946 native_app_window_->SetBounds(pos);
947 } 947 }
948 948
949 void AppWindow::NavigationStateChanged(content::WebContents* source, 949 void AppWindow::NavigationStateChanged(content::WebContents* source,
950 content::InvalidateTypes changed_flags) { 950 content::InvalidateTypes changed_flags) {
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 region.bounds.x(), 1125 region.bounds.x(),
1126 region.bounds.y(), 1126 region.bounds.y(),
1127 region.bounds.right(), 1127 region.bounds.right(),
1128 region.bounds.bottom(), 1128 region.bounds.bottom(),
1129 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 1129 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
1130 } 1130 }
1131 return sk_region; 1131 return sk_region;
1132 } 1132 }
1133 1133
1134 } // namespace extensions 1134 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/app_window/app_window.h ('k') | extensions/shell/browser/shell_app_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698