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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_view.h

Issue 9702068: Move extension pop-ups and notifications to the new auto-resize code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small update Created 8 years, 9 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 | Annotate | Revision Log
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 CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 13 matching lines...) Expand all
24 class ExtensionView : public views::NativeViewHost { 24 class ExtensionView : public views::NativeViewHost {
25 public: 25 public:
26 ExtensionView(ExtensionHost* host, Browser* browser); 26 ExtensionView(ExtensionHost* host, Browser* browser);
27 virtual ~ExtensionView(); 27 virtual ~ExtensionView();
28 28
29 // A class that represents the container that this view is in. 29 // A class that represents the container that this view is in.
30 // (bottom shelf, side bar, etc.) 30 // (bottom shelf, side bar, etc.)
31 class Container { 31 class Container {
32 public: 32 public:
33 virtual ~Container() {} 33 virtual ~Container() {}
34 virtual void OnExtensionPreferredSizeChanged(ExtensionView* view) {} 34 virtual void OnExtensionSizeChanged(ExtensionView* view) {}
35 virtual void OnViewWasResized() {} 35 virtual void OnViewWasResized() {}
36 }; 36 };
37 37
38 ExtensionHost* host() const { return host_; } 38 ExtensionHost* host() const { return host_; }
39 Browser* browser() const { return browser_; } 39 Browser* browser() const { return browser_; }
40 const Extension* extension() const; 40 const Extension* extension() const;
41 content::RenderViewHost* render_view_host() const; 41 content::RenderViewHost* render_view_host() const;
42 void DidStopLoading(); 42 void DidStopLoading();
43 void SetIsClipped(bool is_clipped); 43 void SetIsClipped(bool is_clipped);
44 44
45 // Notification from ExtensionHost. 45 // Notification from ExtensionHost.
46 void UpdatePreferredSize(const gfx::Size& new_size); 46 void ResizeDueToAutoResize(const gfx::Size& new_size);
47 47
48 // Method for the ExtensionHost to notify us when the RenderViewHost has a 48 // Method for the ExtensionHost to notify us when the RenderViewHost has a
49 // connection. 49 // connection.
50 void RenderViewCreated(); 50 void RenderViewCreated();
51 51
52 // Set a custom background for the view. The background will be tiled. 52 // Set a custom background for the view. The background will be tiled.
53 void SetBackground(const SkBitmap& background); 53 void SetBackground(const SkBitmap& background);
54 54
55 // Sets the container for this view. 55 // Sets the container for this view.
56 void SetContainer(Container* container) { container_ = container; } 56 void SetContainer(Container* container) { container_ = container; }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // Note: the view does not own its container. 102 // Note: the view does not own its container.
103 Container* container_; 103 Container* container_;
104 104
105 // Whether this extension view is clipped. 105 // Whether this extension view is clipped.
106 bool is_clipped_; 106 bool is_clipped_;
107 107
108 DISALLOW_COPY_AND_ASSIGN(ExtensionView); 108 DISALLOW_COPY_AND_ASSIGN(ExtensionView);
109 }; 109 };
110 110
111 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_ 111 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698