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

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

Issue 1066563006: GuestView: Move GuestViewManager extension dependencies to ExtensionsGuestViewManagerDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@extensions_guest_view_message_filter
Patch Set: Fixed tests I hope Created 5 years, 8 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 5
6 #include "chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h" 6 #include "chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h"
7 7
8 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" 8 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
9 #include "chrome/browser/favicon/favicon_helper.h" 9 #include "chrome/browser/favicon/favicon_helper.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 content::RenderFrameHost* render_frame_host) { 125 content::RenderFrameHost* render_frame_host) {
126 if (!render_frame_host->GetParent()) 126 if (!render_frame_host->GetParent())
127 InjectChromeVoxIfNeeded(render_frame_host->GetRenderViewHost()); 127 InjectChromeVoxIfNeeded(render_frame_host->GetRenderViewHost());
128 } 128 }
129 129
130 void ChromeWebViewGuestDelegate::OnGuestDestroyed() { 130 void ChromeWebViewGuestDelegate::OnGuestDestroyed() {
131 // Clean up custom context menu items for this guest. 131 // Clean up custom context menu items for this guest.
132 MenuManager* menu_manager = MenuManager::Get( 132 MenuManager* menu_manager = MenuManager::Get(
133 Profile::FromBrowserContext(web_view_guest()->browser_context())); 133 Profile::FromBrowserContext(web_view_guest()->browser_context()));
134 menu_manager->RemoveAllContextItems(MenuItem::ExtensionKey( 134 menu_manager->RemoveAllContextItems(MenuItem::ExtensionKey(
135 web_view_guest()->owner_extension_id(), 135 web_view_guest()->owner_host(),
136 web_view_guest()->view_instance_id())); 136 web_view_guest()->view_instance_id()));
137 } 137 }
138 138
139 // static 139 // static
140 scoped_ptr<base::ListValue> ChromeWebViewGuestDelegate::MenuModelToValue( 140 scoped_ptr<base::ListValue> ChromeWebViewGuestDelegate::MenuModelToValue(
141 const ui::SimpleMenuModel& menu_model) { 141 const ui::SimpleMenuModel& menu_model) {
142 scoped_ptr<base::ListValue> items(new base::ListValue()); 142 scoped_ptr<base::ListValue> items(new base::ListValue());
143 for (int i = 0; i < menu_model.GetItemCount(); ++i) { 143 for (int i = 0; i < menu_model.GetItemCount(); ++i) {
144 base::DictionaryValue* item_value = new base::DictionaryValue(); 144 base::DictionaryValue* item_value = new base::DictionaryValue();
145 // TODO(lazyboy): We need to expose some kind of enum equivalent of 145 // TODO(lazyboy): We need to expose some kind of enum equivalent of
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 chromeos::ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK) { 193 chromeos::ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK) {
194 if (details.enabled) 194 if (details.enabled)
195 InjectChromeVoxIfNeeded(guest_web_contents()->GetRenderViewHost()); 195 InjectChromeVoxIfNeeded(guest_web_contents()->GetRenderViewHost());
196 else 196 else
197 chromevox_injected_ = false; 197 chromevox_injected_ = false;
198 } 198 }
199 } 199 }
200 #endif 200 #endif
201 201
202 } // namespace extensions 202 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698