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

Side by Side Diff: content/public/browser/web_contents.h

Issue 537053002: Implement ManifestManager to handle manifest in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@manifest_fetcher
Patch Set: review comments 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 class InterstitialPage; 50 class InterstitialPage;
51 class PageState; 51 class PageState;
52 class RenderFrameHost; 52 class RenderFrameHost;
53 class RenderProcessHost; 53 class RenderProcessHost;
54 class RenderViewHost; 54 class RenderViewHost;
55 class RenderWidgetHostView; 55 class RenderWidgetHostView;
56 class SiteInstance; 56 class SiteInstance;
57 class WebContentsDelegate; 57 class WebContentsDelegate;
58 struct CustomContextMenuContext; 58 struct CustomContextMenuContext;
59 struct DropData; 59 struct DropData;
60 struct Manifest;
60 struct RendererPreferences; 61 struct RendererPreferences;
61 62
62 // WebContents is the core class in content/. A WebContents renders web content 63 // WebContents is the core class in content/. A WebContents renders web content
63 // (usually HTML) in a rectangular area. 64 // (usually HTML) in a rectangular area.
64 // 65 //
65 // Instantiating one is simple: 66 // Instantiating one is simple:
66 // scoped_ptr<content::WebContents> web_contents( 67 // scoped_ptr<content::WebContents> web_contents(
67 // content::WebContents::Create( 68 // content::WebContents::Create(
68 // content::WebContents::CreateParams(browser_context))); 69 // content::WebContents::CreateParams(browser_context)));
69 // gfx::NativeView view = web_contents->GetNativeView(); 70 // gfx::NativeView view = web_contents->GetNativeView();
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 const base::string16& search_text, 570 const base::string16& search_text,
570 const blink::WebFindOptions& options) = 0; 571 const blink::WebFindOptions& options) = 0;
571 572
572 // Notifies the renderer that the user has closed the FindInPage window 573 // Notifies the renderer that the user has closed the FindInPage window
573 // (and what action to take regarding the selection). 574 // (and what action to take regarding the selection).
574 virtual void StopFinding(StopFindAction action) = 0; 575 virtual void StopFinding(StopFindAction action) = 0;
575 576
576 // Requests the renderer to insert CSS into the main frame's document. 577 // Requests the renderer to insert CSS into the main frame's document.
577 virtual void InsertCSS(const std::string& css) = 0; 578 virtual void InsertCSS(const std::string& css) = 0;
578 579
580 typedef base::Callback<void(const Manifest&)> GetManifestCallback;
581
582 // Requests the Manifest of the main frame's document.
583 virtual void GetManifest(const GetManifestCallback&) = 0;
584
579 #if defined(OS_ANDROID) 585 #if defined(OS_ANDROID)
580 CONTENT_EXPORT static WebContents* FromJavaWebContents( 586 CONTENT_EXPORT static WebContents* FromJavaWebContents(
581 jobject jweb_contents_android); 587 jobject jweb_contents_android);
582 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() = 0; 588 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() = 0;
583 #elif defined(OS_MACOSX) 589 #elif defined(OS_MACOSX)
584 // Allowing other views disables optimizations which assume that only a single 590 // Allowing other views disables optimizations which assume that only a single
585 // WebContents is present. 591 // WebContents is present.
586 virtual void SetAllowOtherViews(bool allow) = 0; 592 virtual void SetAllowOtherViews(bool allow) = 0;
587 593
588 // Returns true if other views are allowed, false otherwise. 594 // Returns true if other views are allowed, false otherwise.
589 virtual bool GetAllowOtherViews() = 0; 595 virtual bool GetAllowOtherViews() = 0;
590 #endif // OS_ANDROID 596 #endif // OS_ANDROID
591 597
592 private: 598 private:
593 // This interface should only be implemented inside content. 599 // This interface should only be implemented inside content.
594 friend class WebContentsImpl; 600 friend class WebContentsImpl;
595 WebContents() {} 601 WebContents() {}
596 }; 602 };
597 603
598 } // namespace content 604 } // namespace content
599 605
600 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ 606 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698