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

Side by Side Diff: chrome/browser/ui/views/frame/instant_preview_controller_views.h

Issue 12386019: Instant: Use only one hidden WebContents per profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
(Empty)
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_INSTANT_PREVIEW_CONTROLLER_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_INSTANT_PREVIEW_CONTROLLER_VIEWS_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "chrome/browser/instant/instant_preview_controller.h"
12
13 class Browser;
14 class ContentsContainer;
15
16 namespace views {
17 class WebView;
18 }
19
20 // A controller that manages the Views-specific Instant preview. Its primary
21 // role is to respond to display-state changes from the Instant model and
22 // reflect this in the visibility and layout of the preview.
23 class InstantPreviewControllerViews : public InstantPreviewController {
24 public:
25 InstantPreviewControllerViews(Browser* browser, ContentsContainer* contents);
26 virtual ~InstantPreviewControllerViews();
27
28 views::WebView* preview() { return preview_.get(); }
29
30 views::WebView* release_preview() WARN_UNUSED_RESULT {
31 return preview_.release();
32 }
33
34 private:
35 // Overridden from InstantPreviewController:
36 virtual void PreviewStateChanged(const InstantModel& model) OVERRIDE;
37
38 ContentsContainer* const contents_;
39
40 // The view that contains the Instant preview web contents.
41 scoped_ptr<views::WebView> preview_;
42
43 DISALLOW_COPY_AND_ASSIGN(InstantPreviewControllerViews);
44 };
45
46 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_INSTANT_PREVIEW_CONTROLLER_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698