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

Side by Side Diff: extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc

Issue 572633003: Enable webview tag in webui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 3 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/guest_view/mime_handler_view/mime_handler_view_gues t.h" 5 #include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_gues t.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "content/public/browser/render_process_host.h" 9 #include "content/public/browser/render_process_host.h"
10 #include "content/public/common/url_constants.h" 10 #include "content/public/common/url_constants.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 53
54 int MimeHandlerViewGuest::GetTaskPrefix() const { 54 int MimeHandlerViewGuest::GetTaskPrefix() const {
55 return IDS_EXTENSION_TASK_MANAGER_MIMEHANDLERVIEW_TAG_PREFIX; 55 return IDS_EXTENSION_TASK_MANAGER_MIMEHANDLERVIEW_TAG_PREFIX;
56 } 56 }
57 57
58 // |embedder_extension_id| is empty for mime handler view. 58 // |embedder_extension_id| is empty for mime handler view.
59 void MimeHandlerViewGuest::CreateWebContents( 59 void MimeHandlerViewGuest::CreateWebContents(
60 const std::string& embedder_extension_id, 60 const std::string& embedder_extension_id,
61 int embedder_render_process_id, 61 int embedder_render_process_id,
62 const GURL& embedder_site_url,
62 const base::DictionaryValue& create_params, 63 const base::DictionaryValue& create_params,
63 const WebContentsCreatedCallback& callback) { 64 const WebContentsCreatedCallback& callback) {
64 std::string orig_mime_type; 65 std::string orig_mime_type;
65 create_params.GetString(mime_handler_view::kMimeType, &orig_mime_type); 66 create_params.GetString(mime_handler_view::kMimeType, &orig_mime_type);
66 DCHECK(!orig_mime_type.empty()); 67 DCHECK(!orig_mime_type.empty());
67 68
68 std::string extension_src; 69 std::string extension_src;
69 create_params.GetString(mime_handler_view::kSrc, &extension_src); 70 create_params.GetString(mime_handler_view::kSrc, &extension_src);
70 DCHECK(!extension_src.empty()); 71 DCHECK(!extension_src.empty());
71 72
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // TODO(fsamuel): This introduces the possibility of out-of-order keyboard 129 // TODO(fsamuel): This introduces the possibility of out-of-order keyboard
129 // events because the guest may be arbitrarily delayed when responding to 130 // events because the guest may be arbitrarily delayed when responding to
130 // keyboard events. In that time, the embedder may have received and processed 131 // keyboard events. In that time, the embedder may have received and processed
131 // additional key events. This needs to be fixed as soon as possible. 132 // additional key events. This needs to be fixed as soon as possible.
132 // See http://crbug.com/229882. 133 // See http://crbug.com/229882.
133 embedder_web_contents()->GetDelegate()->HandleKeyboardEvent(web_contents(), 134 embedder_web_contents()->GetDelegate()->HandleKeyboardEvent(web_contents(),
134 event); 135 event);
135 } 136 }
136 137
137 } // namespace extensions 138 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698