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

Side by Side Diff: athena/activity/public/activity_view_model.h

Issue 548633005: Adding overview / layer framework to Activities so that unloaded / sleeping activities can be shown… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed 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
« no previous file with comments | « no previous file | athena/athena.gyp » ('j') | athena/content/app_activity_registry.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ATHENA_ACTIVITY_PUBLIC_ACTIVITY_VIEW_MODEL_H_ 5 #ifndef ATHENA_ACTIVITY_PUBLIC_ACTIVITY_VIEW_MODEL_H_
6 #define ATHENA_ACTIVITY_PUBLIC_ACTIVITY_VIEW_MODEL_H_ 6 #define ATHENA_ACTIVITY_PUBLIC_ACTIVITY_VIEW_MODEL_H_
7 7
8 #include "athena/athena_export.h" 8 #include "athena/athena_export.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 10
(...skipping 28 matching lines...) Expand all
39 39
40 // True if the activity wants to use Widget's frame, or false if the activity 40 // True if the activity wants to use Widget's frame, or false if the activity
41 // draws its own frame. 41 // draws its own frame.
42 virtual bool UsesFrame() const = 0; 42 virtual bool UsesFrame() const = 0;
43 43
44 // Returns the contents view which might be NULL if the activity is not 44 // Returns the contents view which might be NULL if the activity is not
45 // loaded. Note that the caller should not hold on to the view since it can 45 // loaded. Note that the caller should not hold on to the view since it can
46 // be deleted by the resource manager. 46 // be deleted by the resource manager.
47 virtual views::View* GetContentsView() = 0; 47 virtual views::View* GetContentsView() = 0;
48 48
49 // This gets called before the Activity gets (partially) thrown out of memory
50 // to create a preview image of the activity. Note that even if this function
51 // gets called, |GetOverviewModeImage()| could still return an empty image.
52 virtual void CreateOverviewModeImage() = 0;
53
54 // Returns an image which can be used to represent the activity in e.g. the 49 // Returns an image which can be used to represent the activity in e.g. the
55 // overview mode. The returned image can have no size if either a view exists 50 // overview mode. The returned image can have no size if either a view exists
56 // or the activity has not yet been loaded. In that case 51 // or the activity has not yet been loaded. In that case
57 // GetRepresentativeColor() should be used to clear the preview area. 52 // GetRepresentativeColor() should be used to clear the preview area.
58 // Note: We intentionally do not use a layer / view for this. 53 // Note: We intentionally do not use a layer / view for this.
59 virtual gfx::ImageSkia GetOverviewModeImage() = 0; 54 virtual gfx::ImageSkia GetOverviewModeImage() = 0;
60 55
61 // Prepares the contents view for overview. 56 // Prepares the contents view for overview.
62 virtual void PrepareContentsForOverview() = 0; 57 virtual void PrepareContentsForOverview() = 0;
63 58
64 // Undoes any changes done by PrepareContentsForOverview(). 59 // Undoes any changes done by PrepareContentsForOverview().
65 virtual void ResetContentsView() = 0; 60 virtual void ResetContentsView() = 0;
66 }; 61 };
67 62
68 } // namespace athena 63 } // namespace athena
69 64
70 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_VIEW_MODEL_H_ 65 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_VIEW_MODEL_H_
OLDNEW
« no previous file with comments | « no previous file | athena/athena.gyp » ('j') | athena/content/app_activity_registry.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698