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

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

Issue 1162663004: Introduce browser-side plumbing for sending the lock icon status to DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased onto latest master. Created 5 years, 6 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_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "content/public/browser/invalidate_type.h" 15 #include "content/public/browser/invalidate_type.h"
16 #include "content/public/browser/navigation_type.h" 16 #include "content/public/browser/navigation_type.h"
17 #include "content/public/common/media_stream_request.h" 17 #include "content/public/common/media_stream_request.h"
18 #include "content/public/common/security_style.h"
18 #include "content/public/common/window_container_type.h" 19 #include "content/public/common/window_container_type.h"
19 #include "third_party/WebKit/public/platform/WebDisplayMode.h" 20 #include "third_party/WebKit/public/platform/WebDisplayMode.h"
20 #include "third_party/WebKit/public/web/WebDragOperation.h" 21 #include "third_party/WebKit/public/web/WebDragOperation.h"
21 #include "third_party/skia/include/core/SkColor.h" 22 #include "third_party/skia/include/core/SkColor.h"
22 #include "ui/base/window_open_disposition.h" 23 #include "ui/base/window_open_disposition.h"
23 #include "ui/gfx/geometry/rect_f.h" 24 #include "ui/gfx/geometry/rect_f.h"
24 #include "ui/gfx/native_widget_types.h" 25 #include "ui/gfx/native_widget_types.h"
25 26
26 class GURL; 27 class GURL;
27 28
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 virtual void MoveValidationMessage(WebContents* web_contents, 479 virtual void MoveValidationMessage(WebContents* web_contents,
479 const gfx::Rect& anchor_in_root_view) {} 480 const gfx::Rect& anchor_in_root_view) {}
480 481
481 // Returns true if the WebContents is never visible. 482 // Returns true if the WebContents is never visible.
482 virtual bool IsNeverVisible(WebContents* web_contents); 483 virtual bool IsNeverVisible(WebContents* web_contents);
483 484
484 // Called in response to a request to save a frame. If this returns true, the 485 // Called in response to a request to save a frame. If this returns true, the
485 // default behavior is suppressed. 486 // default behavior is suppressed.
486 virtual bool SaveFrame(const GURL& url, const Referrer& referrer); 487 virtual bool SaveFrame(const GURL& url, const Referrer& referrer);
487 488
489 // Can be overridden by a delegate to return the security style of the given
490 // web contents. Returns SECURITY_STYLE_UNKNOWN if not overriden.
491 virtual SecurityStyle GetSecurityStyle(const WebContents* web_contents);
492
488 protected: 493 protected:
489 virtual ~WebContentsDelegate(); 494 virtual ~WebContentsDelegate();
490 495
491 private: 496 private:
492 friend class WebContentsImpl; 497 friend class WebContentsImpl;
493 498
494 // Called when |this| becomes the WebContentsDelegate for |source|. 499 // Called when |this| becomes the WebContentsDelegate for |source|.
495 void Attach(WebContents* source); 500 void Attach(WebContents* source);
496 501
497 // Called when |this| is no longer the WebContentsDelegate for |source|. 502 // Called when |this| is no longer the WebContentsDelegate for |source|.
498 void Detach(WebContents* source); 503 void Detach(WebContents* source);
499 504
500 // The WebContents that this is currently a delegate for. 505 // The WebContents that this is currently a delegate for.
501 std::set<WebContents*> attached_contents_; 506 std::set<WebContents*> attached_contents_;
502 }; 507 };
503 508
504 } // namespace content 509 } // namespace content
505 510
506 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 511 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698