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

Side by Side Diff: chrome/browser/guest_view/web_view/javascript_dialog_helper.cc

Issue 449203002: Move constants in guest view from chrome to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 4 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 "chrome/browser/guest_view/web_view/javascript_dialog_helper.h" 5 #include "chrome/browser/guest_view/web_view/javascript_dialog_helper.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/guest_view/guest_view_constants.h"
10 #include "chrome/browser/guest_view/web_view/web_view_constants.h" 9 #include "chrome/browser/guest_view/web_view/web_view_constants.h"
11 #include "chrome/browser/guest_view/web_view/web_view_guest.h" 10 #include "chrome/browser/guest_view/web_view/web_view_guest.h"
12 #include "chrome/browser/guest_view/web_view/web_view_permission_helper.h" 11 #include "chrome/browser/guest_view/web_view/web_view_permission_helper.h"
13 #include "chrome/browser/guest_view/web_view/web_view_permission_types.h" 12 #include "chrome/browser/guest_view/web_view/web_view_permission_types.h"
13 #include "extensions/browser/guest_view/guest_view_constants.h"
14 14
15 namespace { 15 namespace {
16 16
17 std::string JavaScriptMessageTypeToString( 17 std::string JavaScriptMessageTypeToString(
18 content::JavaScriptMessageType message_type) { 18 content::JavaScriptMessageType message_type) {
19 switch (message_type) { 19 switch (message_type) {
20 case content::JAVASCRIPT_MESSAGE_TYPE_ALERT: 20 case content::JAVASCRIPT_MESSAGE_TYPE_ALERT:
21 return "alert"; 21 return "alert";
22 case content::JAVASCRIPT_MESSAGE_TYPE_CONFIRM: 22 case content::JAVASCRIPT_MESSAGE_TYPE_CONFIRM:
23 return "confirm"; 23 return "confirm";
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 content::WebContents* web_contents) { 93 content::WebContents* web_contents) {
94 } 94 }
95 95
96 void JavaScriptDialogHelper::OnPermissionResponse( 96 void JavaScriptDialogHelper::OnPermissionResponse(
97 const DialogClosedCallback& callback, 97 const DialogClosedCallback& callback,
98 bool allow, 98 bool allow,
99 const std::string& user_input) { 99 const std::string& user_input) {
100 callback.Run(allow && web_view_guest_->attached(), 100 callback.Run(allow && web_view_guest_->attached(),
101 base::UTF8ToUTF16(user_input)); 101 base::UTF8ToUTF16(user_input));
102 } 102 }
OLDNEW
« no previous file with comments | « chrome/browser/guest_view/guest_view_manager.cc ('k') | chrome/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698