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

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_guest.h

Issue 885493007: Refactoring: de-couple Extensions from "script injection System" [render side] : 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Devlin@'s comments. Created 5 years, 10 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 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 static int GetViewInstanceId(content::WebContents* contents); 55 static int GetViewInstanceId(content::WebContents* contents);
56 56
57 static const char Type[]; 57 static const char Type[];
58 58
59 // Return the stored rules registry ID of the given webview. Will generate 59 // Return the stored rules registry ID of the given webview. Will generate
60 // an ID for the first query. 60 // an ID for the first query.
61 static int GetOrGenerateRulesRegistryID( 61 static int GetOrGenerateRulesRegistryID(
62 int embedder_process_id, 62 int embedder_process_id,
63 int web_view_instance_id); 63 int web_view_instance_id);
64 64
65 // Return the stored script injection instance ID of the given guest.
66 // Will generate an ID for the first query.
67 static int GetOrGenerateScriptInjectionInstanceID(
68 int embedder_process_id,
69 int guest_instance_id);
70
65 // Request navigating the guest to the provided |src| URL. 71 // Request navigating the guest to the provided |src| URL.
66 void NavigateGuest(const std::string& src, bool force_navigation); 72 void NavigateGuest(const std::string& src, bool force_navigation);
67 73
68 // Shows the context menu for the guest. 74 // Shows the context menu for the guest.
69 // |items| acts as a filter. This restricts the current context's default 75 // |items| acts as a filter. This restricts the current context's default
70 // menu items to contain only the items from |items|. 76 // menu items to contain only the items from |items|.
71 // |items| == NULL means no filtering will be applied. 77 // |items| == NULL means no filtering will be applied.
72 void ShowContextMenu( 78 void ShowContextMenu(
73 int request_id, 79 int request_id,
74 const WebViewGuestDelegate::MenuItemVector* items); 80 const WebViewGuestDelegate::MenuItemVector* items);
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 // This is used to ensure pending tasks will not fire after this object is 370 // This is used to ensure pending tasks will not fire after this object is
365 // destroyed. 371 // destroyed.
366 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; 372 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_;
367 373
368 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 374 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
369 }; 375 };
370 376
371 } // namespace extensions 377 } // namespace extensions
372 378
373 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 379 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698