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

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

Issue 1181263007: WebView context menu cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: A new strategy. Rebased. Created 5 years, 5 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 static int GetViewInstanceId(content::WebContents* contents); 63 static int GetViewInstanceId(content::WebContents* contents);
64 64
65 static const char Type[]; 65 static const char Type[];
66 66
67 // Returns the stored rules registry ID of the given webview. Will generate 67 // Returns the stored rules registry ID of the given webview. Will generate
68 // an ID for the first query. 68 // an ID for the first query.
69 static int GetOrGenerateRulesRegistryID( 69 static int GetOrGenerateRulesRegistryID(
70 int embedder_process_id, 70 int embedder_process_id,
71 int web_view_instance_id); 71 int web_view_instance_id);
72 72
73 // Retrieve and return the extension ID for the WebView identified by
74 // |embedder_process_id| and |view_instance_id|. If no extension ID can be
75 // found for that GuestView, an empty string will be returned.
76 static std::string GetExtensionID(int embedder_process_id,
77 int view_instance_id);
78
79 // Associate the extension ID |extension_id| with the WebView identified by
80 // |embedder_process_id| and |view_instance_id|.
81 static void RegisterExtensionID(const std::string& extension_id,
82 int embedder_process_id,
83 int view_instance_id);
84
73 // Get the current zoom. 85 // Get the current zoom.
74 double GetZoom() const; 86 double GetZoom() const;
75 87
76 // Get the current zoom mode. 88 // Get the current zoom mode.
77 ui_zoom::ZoomController::ZoomMode GetZoomMode(); 89 ui_zoom::ZoomController::ZoomMode GetZoomMode();
78 90
79 // Request navigating the guest to the provided |src| URL. 91 // Request navigating the guest to the provided |src| URL.
80 void NavigateGuest(const std::string& src, bool force_navigation); 92 void NavigateGuest(const std::string& src, bool force_navigation);
81 93
82 // Shows the context menu for the guest. 94 // Shows the context menu for the guest.
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 // This is used to ensure pending tasks will not fire after this object is 426 // This is used to ensure pending tasks will not fire after this object is
415 // destroyed. 427 // destroyed.
416 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; 428 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_;
417 429
418 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 430 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
419 }; 431 };
420 432
421 } // namespace extensions 433 } // namespace extensions
422 434
423 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 435 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698