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

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

Issue 702473005: athena: Remove ActivityViewModel::CreateWidget(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « athena/activity/activity_manager_impl.cc ('k') | athena/content/app_activity.h » ('j') | no next file with comments »
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // True if the activity wants to use Widget's frame, or false if the activity 44 // True if the activity wants to use Widget's frame, or false if the activity
45 // draws its own frame. 45 // draws its own frame.
46 virtual bool UsesFrame() const = 0; 46 virtual bool UsesFrame() const = 0;
47 47
48 // Returns the contents view which might be nullptr if the activity is not 48 // Returns the contents view which might be nullptr if the activity is not
49 // loaded. Note that the caller should not hold on to the view since it can 49 // loaded. Note that the caller should not hold on to the view since it can
50 // be deleted by the resource manager. 50 // be deleted by the resource manager.
51 virtual views::View* GetContentsView() = 0; 51 virtual views::View* GetContentsView() = 0;
52 52
53 // Creates a custom widget for the activity. Returns nullptr to use default
54 // implementation.
55 virtual views::Widget* CreateWidget() = 0;
56
57 // Returns an image which can be used to represent the activity in e.g. the 53 // Returns an image which can be used to represent the activity in e.g. the
58 // overview mode. The returned image can have no size if either a view exists 54 // overview mode. The returned image can have no size if either a view exists
59 // or the activity has not yet been loaded or ever been presented. In that 55 // or the activity has not yet been loaded or ever been presented. In that
60 // case GetRepresentativeColor() should be used to clear the preview area. 56 // case GetRepresentativeColor() should be used to clear the preview area.
61 // Note that since the image gets created upon request, and the 57 // Note that since the image gets created upon request, and the
62 // ActivityViewModel will hold no reference to the returned image data. As 58 // ActivityViewModel will hold no reference to the returned image data. As
63 // such it is advisable to hold on to the image as long as needed instead of 59 // such it is advisable to hold on to the image as long as needed instead of
64 // calling this function frequently since it will cause time to generate. 60 // calling this function frequently since it will cause time to generate.
65 virtual gfx::ImageSkia GetOverviewModeImage() = 0; 61 virtual gfx::ImageSkia GetOverviewModeImage() = 0;
66 62
67 // Prepares the contents view for overview. 63 // Prepares the contents view for overview.
68 virtual void PrepareContentsForOverview() = 0; 64 virtual void PrepareContentsForOverview() = 0;
69 65
70 // Undoes any changes done by PrepareContentsForOverview(). 66 // Undoes any changes done by PrepareContentsForOverview().
71 virtual void ResetContentsView() = 0; 67 virtual void ResetContentsView() = 0;
72 }; 68 };
73 69
74 } // namespace athena 70 } // namespace athena
75 71
76 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_VIEW_MODEL_H_ 72 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_VIEW_MODEL_H_
OLDNEW
« no previous file with comments | « athena/activity/activity_manager_impl.cc ('k') | athena/content/app_activity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698