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

Side by Side Diff: chrome/browser/ui/ime/ime_window.h

Issue 1756853002: Correctly sets the security origin for the IME window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed tests. Created 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_IME_IME_WINDOW_H_ 5 #ifndef CHROME_BROWSER_UI_IME_IME_WINDOW_H_
6 #define CHROME_BROWSER_UI_IME_IME_WINDOW_H_ 6 #define CHROME_BROWSER_UI_IME_IME_WINDOW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "content/public/browser/notification_observer.h" 12 #include "content/public/browser/notification_observer.h"
13 #include "content/public/browser/notification_registrar.h" 13 #include "content/public/browser/notification_registrar.h"
14 #include "content/public/browser/web_contents_delegate.h" 14 #include "content/public/browser/web_contents_delegate.h"
15 #include "content/public/browser/web_contents_observer.h" 15 #include "content/public/browser/web_contents_observer.h"
16 #include "extensions/browser/extension_icon_image.h" 16 #include "extensions/browser/extension_icon_image.h"
17 #include "ui/gfx/geometry/rect.h" 17 #include "ui/gfx/geometry/rect.h"
18 #include "ui/gfx/image/image.h" 18 #include "ui/gfx/image/image.h"
19 #include "ui/views/widget/widget_delegate.h" 19 #include "ui/views/widget/widget_delegate.h"
20 #include "ui/views/widget/widget_observer.h" 20 #include "ui/views/widget/widget_observer.h"
21 21
22 class GURL; 22 class GURL;
23 class Profile; 23 class Profile;
24 24
25 namespace content { 25 namespace content {
26 class RenderFrameHost;
26 class WebContents; 27 class WebContents;
27 } 28 }
28 29
29 namespace extensions { 30 namespace extensions {
30 class Extension; 31 class Extension;
31 } 32 }
32 33
33 namespace gfx { 34 namespace gfx {
34 class Image; 35 class Image;
35 class Rect; 36 class Rect;
(...skipping 17 matching lines...) Expand all
53 public extensions::IconImage::Observer, 54 public extensions::IconImage::Observer,
54 public content::WebContentsDelegate { 55 public content::WebContentsDelegate {
55 public: 56 public:
56 enum Mode { NORMAL, FOLLOW_CURSOR }; 57 enum Mode { NORMAL, FOLLOW_CURSOR };
57 58
58 // Takes |url| as string instead of GURL because resolving GURL requires 59 // Takes |url| as string instead of GURL because resolving GURL requires
59 // |extension|. As the client code already passes in |extension|, it'd be 60 // |extension|. As the client code already passes in |extension|, it'd be
60 // better to simply the client code. 61 // better to simply the client code.
61 ImeWindow(Profile* profile, 62 ImeWindow(Profile* profile,
62 const extensions::Extension* extension, 63 const extensions::Extension* extension,
64 content::RenderFrameHost* render_frame_host,
Devlin 2016/03/02 18:05:11 Document |render_frame_host| - and maybe even rena
Shu Chen 2016/03/03 01:33:32 Done.
63 const std::string& url, 65 const std::string& url,
64 Mode mode, 66 Mode mode,
65 const gfx::Rect& bounds); 67 const gfx::Rect& bounds);
66 68
67 // Methods delegate to ImeNativeWindow. 69 // Methods delegate to ImeNativeWindow.
68 void Show(); 70 void Show();
69 void Hide(); 71 void Hide();
70 void Close(); 72 void Close();
71 void SetBounds(const gfx::Rect& bounds); 73 void SetBounds(const gfx::Rect& bounds);
72 // Aligns the follow-cursor window to the given cursor bounds. 74 // Aligns the follow-cursor window to the given cursor bounds.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 ImeNativeWindow* native_window_; // Weak, it does self-destruction. 138 ImeNativeWindow* native_window_; // Weak, it does self-destruction.
137 139
138 base::ObserverList<ImeWindowObserver> observers_; 140 base::ObserverList<ImeWindowObserver> observers_;
139 141
140 DISALLOW_COPY_AND_ASSIGN(ImeWindow); 142 DISALLOW_COPY_AND_ASSIGN(ImeWindow);
141 }; 143 };
142 144
143 } // namespace ui 145 } // namespace ui
144 146
145 #endif // CHROME_BROWSER_UI_IME_IME_WINDOW_H_ 147 #endif // CHROME_BROWSER_UI_IME_IME_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698